Trait steward::dep::Dependency

source ·
pub trait Dependency: Send + Sync {
    // Required methods
    fn tag(&self) -> &str;
    fn check<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn wait<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn DependencyWaitError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Dependency trait.

See dep module documentation.

Required Methods§

source

fn tag(&self) -> &str

A tag used as an identificator in output when process runs as a part of a ProcessPool.

source

fn check<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), ()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

A method that checks if a dependency is available.

source

fn wait<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn DependencyWaitError>>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

A method that resolves when a dependency becomes available.

Implementors§