# ProviderAdapter

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/automation/provider/struct-provideradapter/

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

```rust
struct ProviderAdapter<T: ObjectType>
```

The handle through which an automation peer of class `T` implements a
provider contract: `impl IInvokeProvider for ProviderAdapter<MyPeer>`.

The peer class then lists the handle in the `interfaces` of its class
information, with the conversion of this type:
`interfaces: [Rc<dyn IInvokeProvider> => ProviderAdapter::as_invoke_provider]`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L58)

## Members

- [`0`](#struct_field-0)
- [`as_embedded_root_provider`](#function-as_embedded_root_provider)
- [`as_expand_collapse_provider`](#function-as_expand_collapse_provider)
- [`as_invoke_provider`](#function-as_invoke_provider)
- [`as_range_value_provider`](#function-as_range_value_provider)
- [`as_root_provider`](#function-as_root_provider)
- [`as_scroll_provider`](#function-as_scroll_provider)
- [`as_selection_item_provider`](#function-as_selection_item_provider)
- [`as_selection_provider`](#function-as_selection_provider)
- [`as_text_provider`](#function-as_text_provider)
- [`as_text_provider2`](#function-as_text_provider2)
- [`as_text_child_provider`](#function-as_text_child_provider)
- [`as_text_edit_provider`](#function-as_text_edit_provider)
- [`as_toggle_provider`](#function-as_toggle_provider)
- [`as_value_provider`](#function-as_value_provider)

<a id="struct_field-0"></a>

### 0

```rust
0: ferroui_base::Ref<T>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L58)

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

### as_embedded_root_provider

```rust
fn as_embedded_root_provider(peer: Ref<T>) -> Rc<dyn IEmbeddedRootProvider>
where Self: IEmbeddedRootProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_expand_collapse_provider

```rust
fn as_expand_collapse_provider(peer: Ref<T>) -> Rc<dyn IExpandCollapseProvider>
where Self: IExpandCollapseProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_invoke_provider

```rust
fn as_invoke_provider(peer: Ref<T>) -> Rc<dyn IInvokeProvider>
where Self: IInvokeProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_range_value_provider

```rust
fn as_range_value_provider(peer: Ref<T>) -> Rc<dyn IRangeValueProvider>
where Self: IRangeValueProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_root_provider

```rust
fn as_root_provider(peer: Ref<T>) -> Rc<dyn IRootProvider>
where Self: IRootProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_scroll_provider

```rust
fn as_scroll_provider(peer: Ref<T>) -> Rc<dyn IScrollProvider>
where Self: IScrollProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_selection_item_provider

```rust
fn as_selection_item_provider(peer: Ref<T>) -> Rc<dyn ISelectionItemProvider>
where Self: ISelectionItemProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_selection_provider

```rust
fn as_selection_provider(peer: Ref<T>) -> Rc<dyn ISelectionProvider>
where Self: ISelectionProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_text_provider

```rust
fn as_text_provider(peer: Ref<T>) -> Rc<dyn ITextProvider>
where Self: ITextProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_text_provider2

```rust
fn as_text_provider2(peer: Ref<T>) -> Rc<dyn ITextProvider2>
where Self: ITextProvider2
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_text_child_provider

```rust
fn as_text_child_provider(peer: Ref<T>) -> Rc<dyn ITextChildProvider>
where Self: ITextChildProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_text_edit_provider

```rust
fn as_text_edit_provider(peer: Ref<T>) -> Rc<dyn ITextEditProvider>
where Self: ITextEditProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_toggle_provider

```rust
fn as_toggle_provider(peer: Ref<T>) -> Rc<dyn IToggleProvider>
where Self: IToggleProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

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

### as_value_provider

```rust
fn as_value_provider(peer: Ref<T>) -> Rc<dyn IValueProvider>
where Self: IValueProvider
```

Converts the handle of a peer to the handle of the provider
contract it implements on this type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/automation/provider/mod.rs#L77)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`IExpandCollapseProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iexpandcollapseprovider/)
- [`IValueProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-ivalueprovider/)
- [`IInvokeProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iinvokeprovider/)
- [`ISelectionProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iselectionprovider/)
- [`ISelectionItemProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iselectionitemprovider/)
- [`IEmbeddedRootProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iembeddedrootprovider/)
- [`IRootProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-irootprovider/)
- [`IScrollProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-iscrollprovider/)
- [`IToggleProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itoggleprovider/)
- [`IRangeValueProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-irangevalueprovider/)
- [`ITextChildProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itextchildprovider/)
- [`ITextEditProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itexteditprovider/)
- [`ITextProvider2`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itextprovider2/)
- [`ITextProvider`](/docs/0.5.0/api/ferroui-controls/automation/provider/trait-itextprovider/)

## Availability

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