Struct UseDelegate

Source
pub struct UseDelegate<Components>(pub PhantomData<Components>);

Tuple Fields§

§0: PhantomData<Components>

Trait Implementations§

Source§

impl<Context, SourceError, __Components__, __Delegate__> ErrorRaiser<Context, SourceError> for UseDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<SourceError, Delegate = __Delegate__>, __Delegate__: ErrorRaiser<Context, SourceError>,

Used for injecting external error types into Self::Error.

As an example, if Context: CanRaiseError<ParseIntError>, then we would be able to call Context::raise_error(err) for an error value err: ParseIntError and get back a Context::Error value.

Source§

fn raise_error(error: SourceError) -> <Context as HasErrorType>::Error

Source§

impl<Context, Detail, __Components__, __Delegate__> ErrorWrapper<Context, Detail> for UseDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<Detail, Delegate = __Delegate__>, __Delegate__: ErrorWrapper<Context, Detail>,

Source§

fn wrap_error( error: <Context as HasErrorType>::Error, detail: Detail, ) -> <Context as HasErrorType>::Error

Source§

impl<Context, Tag, __Components__, __Delegate__> ProvideType<Context, Tag> for UseDelegate<__Components__>
where __Components__: DelegateComponent<Tag, Delegate = __Delegate__>, __Delegate__: ProvideType<Context, Tag>,

Source§

type Type = <__Delegate__ as ProvideType<Context, Tag>>::Type

Source§

impl<Context, SourceError, __Components__, __Delegate__> IsProviderFor<ErrorRaiserComponent, Context, SourceError> for UseDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<SourceError, Delegate = __Delegate__>, __Delegate__: IsProviderFor<ErrorRaiserComponent, Context, SourceError> + ErrorRaiser<Context, SourceError>,

Source§

impl<Context, Detail, __Components__, __Delegate__> IsProviderFor<ErrorWrapperComponent, Context, Detail> for UseDelegate<__Components__>
where Context: HasErrorType, __Components__: DelegateComponent<Detail, Delegate = __Delegate__>, __Delegate__: IsProviderFor<ErrorWrapperComponent, Context, Detail> + ErrorWrapper<Context, Detail>,

Source§

impl<Context, Tag, __Components__, __Delegate__> IsProviderFor<TypeComponent, Context, Tag> for UseDelegate<__Components__>
where __Components__: DelegateComponent<Tag, Delegate = __Delegate__>, __Delegate__: IsProviderFor<TypeComponent, Context, Tag> + ProvideType<Context, Tag>,

Auto Trait Implementations§

§

impl<Components> Freeze for UseDelegate<Components>

§

impl<Components> Send for UseDelegate<Components>
where Components: Send,

§

impl<Components> Sync for UseDelegate<Components>
where Components: Sync,

§

impl<Components> RefUnwindSafe for UseDelegate<Components>
where Components: RefUnwindSafe,

§

impl<Components> Unpin for UseDelegate<Components>
where Components: Unpin,

§

impl<Components> UnwindSafe for UseDelegate<Components>
where Components: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<A> Async for A
where A: Send + Sync,