# ConverterService

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-reactiveui/binding/bindings/struct-converterservice/

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

```rust
struct ConverterService
```

The converters of the bindings: the typed, fallback and set-method registries
(`ConverterService`). `BindingConverters::current` is the
one the bindings use; `register_default_converters` fills a
service with the built-in converters.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L54)

## Members

- [`new`](#function-new)
- [`typed_converters`](#function-typed_converters)
- [`fallback_converters`](#function-fallback_converters)
- [`set_method_converters`](#function-set_method_converters)
- [`resolve_converter`](#function-resolve_converter)
- [`resolve_set_method_converter`](#function-resolve_set_method_converter)

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

### new

```rust
fn new() -> Self
```

A service with empty registries.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L62)

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

### typed_converters

```rust
fn typed_converters(self: &Self) -> &BindingTypeConverterRegistry
```

The typed converters (`TypedConverters`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L67)

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

### fallback_converters

```rust
fn fallback_converters(self: &Self) -> &BindingFallbackConverterRegistry
```

The fallback converters (`FallbackConverters`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L72)

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

### set_method_converters

```rust
fn set_method_converters(self: &Self) -> &SetMethodBindingConverterRegistry
```

The set-method converters (`SetMethodConverters`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L77)

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

### resolve_converter

```rust
fn resolve_converter(self: &Self, from_type: ConverterType, to_type: ConverterType) -> Option<ResolvedConverter>
```

The converter from `from_type` to `to_type`: the typed converter of the exact pair with the
highest affinity, or else the fallback converter with the highest affinity, or `None`
(`ResolveConverter`). A typed converter wins over a fallback converter whatever their
affinities.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L85)

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

### resolve_set_method_converter

```rust
fn resolve_set_method_converter(self: &Self, from_type: Option<ConverterType>, to_type: Option<ConverterType>) -> Option<Rc<dyn ISetMethodBindingConverter>>
```

The set-method converter for `from_type` and `to_type` (`ResolveSetMethodConverter`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI/binding/bindings/converters/converter_service.rs#L93)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ConverterMigrationHelperMixins`](/docs/0.5.0/api/ferroui-reactiveui/binding/bindings/trait-convertermigrationhelpermixins/)
- `Default`
- `Debug`

## Availability

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