Trait Process

Source
pub trait Process {
    type Error: Error;
    type Output;
    type Status;

    // Required methods
    async fn run(self) -> Result<Self::Output, Self::Error>;
    fn on_status_changed(
        &mut self,
        f: impl Fn(&Self::Status) -> Result<(), Self::Error> + Send + 'static,
    ) -> Result<(), Self::Error>;
}

Required Associated Types§

Required Methods§

Source

async fn run(self) -> Result<Self::Output, Self::Error>

Source

fn on_status_changed( &mut self, f: impl Fn(&Self::Status) -> Result<(), Self::Error> + Send + 'static, ) -> Result<(), Self::Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§