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§

Source§

impl FromClientPart<Arc<ApiConfigurations>> for Client

Source§

impl FromClientPart<KeyStore<KeyIds>> for Client

Source§

impl<T: RepositoryItem> FromClientPart<Arc<dyn Repository<T>>> for Client

Available on crate feature internal only.
Source§

type Error = StateRegistryError