Skip to main content

Applicable

Trait Applicable 

Source
pub trait Applicable<T> {
    type Output;

    // Required method
    fn apply(self, target: T) -> Self::Output;
}
Expand description

The helper which determines whether a type can be applied to the target.

Required Associated Types§

Source

type Output

The type of the result produced by applying the value to the target.

Required Methods§

Source

fn apply(self, target: T) -> Self::Output

Makes the target do something with the self.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<C, K, Q, R> Applicable<IntermediateAnyError<C, K>> for (Q, R)
where C: Context, K: Kind, Q: Into<C::Key>, R: Convertable<C::Converter, C::Value>,

Source§

fn apply(self, target: IntermediateAnyError<C, K>) -> Self::Output

Add context information represented as a key-value pairs to target using self’s components.

Source§

type Output = IntermediateAnyError<C, K>

Source§

impl<C, K, S> Applicable<AnyError<C, K>> for (S, K)
where C: AbstractContext, K: Kind, S: Into<String>,

Source§

fn apply(self, target: AnyError<C, K>) -> Self::Output

Makes a new IntermediateAnyError which wraps target and sets its error message and error kind to self’s corresponding components.

Source§

type Output = IntermediateAnyError<C, K>

Source§

impl<C, K> Applicable<AnyError<C, K>> for &str
where C: AbstractContext, K: Kind,

Source§

fn apply(self, target: AnyError<C, K>) -> Self::Output

Makes a new IntermediateAnyError which wraps target and sets its error message to self.

Source§

type Output = IntermediateAnyError<C, K>

Source§

impl<C, K> Applicable<AnyError<C, K>> for String
where C: AbstractContext, K: Kind,

Source§

fn apply(self, target: AnyError<C, K>) -> Self::Output

Makes a new IntermediateAnyError which wraps target and sets its error message to self.

Source§

type Output = IntermediateAnyError<C, K>

Source§

impl<T, C, K, Q, R> Applicable<Result<T, IntermediateAnyError<C, K>>> for (Q, R)
where C: Context, K: Kind, Q: Into<C::Key>, R: Convertable<C::Converter, C::Value>,

Source§

fn apply(self, target: Result<T, IntermediateAnyError<C, K>>) -> Self::Output

Delegates the parameters to IntermediateAnyError’s implementation.

Source§

type Output = Result<T, IntermediateAnyError<C, K>>

Source§

impl<T, C, K, S> Applicable<Result<T, AnyError<C, K>>> for (S, K)
where C: AbstractContext, K: Kind, S: Into<String>,

Source§

fn apply(self, target: Result<T, AnyError<C, K>>) -> Self::Output

Delegates the parameters to AnyError’s implementation.

Source§

type Output = Result<T, IntermediateAnyError<C, K>>

Source§

impl<T, C, K> Applicable<Result<T, AnyError<C, K>>> for &str
where C: AbstractContext, K: Kind,

Source§

fn apply(self, target: Result<T, AnyError<C, K>>) -> Self::Output

Delegates the parameters to AnyError’s implementation.

Source§

type Output = Result<T, IntermediateAnyError<C, K>>

Source§

impl<T, C, K> Applicable<Result<T, AnyError<C, K>>> for String
where C: AbstractContext, K: Kind,

Source§

fn apply(self, target: Result<T, AnyError<C, K>>) -> Self::Output

Delegates the parameters to AnyError’s implementation.

Source§

type Output = Result<T, IntermediateAnyError<C, K>>

Implementors§