Trait ResourceTag

Source
pub trait ResourceTag: 'static {
    type Arg: TypeFn;
    type Out: TypeFn;
}
Expand description

A marker type used as a key for requesting values from Provide.

§Note

Types implementing this trait are generally meant to be used in generic parameters but not instantiated as values.

Required Associated Types§

Source

type Arg: TypeFn

A TypeFn specifying the argument type of this tag. The argument contains any information needed to provide this resource.

Source

type Out: TypeFn

A TypeFn specifying the resolved type of this tag.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ResourceTag for ()

Implementors§

Source§

impl<T: ?Sized + 'static> ResourceTag for Value<T>

Source§

impl<Tag: ResourceTag> ResourceTag for Mut<Tag>

Source§

type Arg = <Tag as ResourceTag>::Arg

Source§

type Out = Mut<<Tag as ResourceTag>::Out>

Source§

impl<Tag: ResourceTag> ResourceTag for Ref<Tag>

Source§

type Arg = <Tag as ResourceTag>::Arg

Source§

type Out = Ref<<Tag as ResourceTag>::Out>