# IWantsToRegisterStuff

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/registration/trait-iwantstoregisterstuff/

**trait** · [`ferroui-reactiveui`](/docs/0.5.0/api/ferroui-reactiveui/) · v0.5.0

```rust
trait IWantsToRegisterStuff
```

A type that registers services with ReactiveUI's dependency resolver (`IWantsToRegisterStuff`),
through the builder:

```
use ferroui_reactiveui::{IRegistrar, IWantsToRegisterStuff, RegistrarExt};
use std::rc::Rc;

struct Greeting(&'static str);

struct MyRegistrations;

impl IWantsToRegisterStuff for MyRegistrations {
    fn register(&self, registrar: &dyn IRegistrar) {
        registrar.register_constant(|| Rc::new(Greeting("hello")));
    }
}
```

Assembly scanning, which upstream used to find these types, is not ported (reflection); a
builder is given them with `with_registration` or `with_platform_module`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/registration/i_wants_to_register_stuff.rs#L25)

## Members

- [`register`](#function-register)

<a id="function-register"></a>

### register

```rust
fn register(self: &Self, registrar: &dyn IRegistrar)
```

Registers the services with `registrar` (`Register(IRegistrar)`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/registration/i_wants_to_register_stuff.rs#L27)

## Trait implementations

- [`IWantsToRegisterStuff`](/docs/0.5.0/api/ferroui-reactiveui/registration/trait-iwantstoregisterstuff/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
