# Dependency

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-dependency-injection/struct-dependency/

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

```rust
struct Dependency
```

A constructor parameter's call site, used without running user code during validation.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L33)

## Members

- [`identifier`](#struct_field-identifier)
- [`kind`](#struct_field-kind)
- [`lookup_mode`](#struct_field-lookup_mode)
- [`required`](#function-required)
- [`keyed`](#function-keyed)
- [`inherited`](#function-inherited)
- [`optional`](#function-optional)
- [`enumerable`](#function-enumerable)

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

### identifier

```rust
identifier: ServiceIdentifier
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L34)

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

### kind

```rust
kind: DependencyKind
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L35)

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

### lookup_mode

```rust
lookup_mode: ServiceKeyLookupMode
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L36)

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

### required

```rust
fn required<S: ?Sized + 'static>() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L39)

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

### keyed

```rust
fn keyed<S: ?Sized + 'static>(key: Option<ServiceKey>) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L46)

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

### inherited

```rust
fn inherited<S: ?Sized + 'static>() -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L57)

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

### optional

```rust
fn optional(self: Self) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L63)

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

### enumerable

```rust
fn enumerable(self: Self) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.DependencyInjection/service_descriptor.rs#L67)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- `Clone`
- `Debug`

## Availability

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