Skip to main content

FromClientPart

Trait FromClientPart 

Source
pub trait FromClientPart<T> {
    type Error;

    // Required method
    fn get_part(&self) -> Result<T, Self::Error>;
}
Expand description

Trait for extracting parts/dependencies from a Client.

Implemented by Client for each dependency type that can be extracted. Used internally by #[derive(FromClient)] - users should derive FromClient rather than using this trait directly.

Required Associated Types§

Source

type Error

The error type returned when extraction fails.

Required Methods§

Source

fn get_part(&self) -> Result<T, Self::Error>

Extract a dependency of type T from self.

Implementors§