Skip to main content

Instance

Trait Instance 

Source
pub trait Instance<O>: Sized + Send{
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn id(&self) -> Id;
    fn status(&self) -> impl Future<Output = Result<Status, Self::Error>> + Send;
    fn cancel(&self) -> impl Future<Output = Result<(), Self::Error>> + Send;
    fn join(
        self,
    ) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send;
    fn detach(self) -> Id;

    // Provided method
    fn cancel_and_join(
        self,
    ) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send { ... }
}

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn id(&self) -> Id

Source

fn status(&self) -> impl Future<Output = Result<Status, Self::Error>> + Send

Source

fn cancel(&self) -> impl Future<Output = Result<(), Self::Error>> + Send

Source

fn join( self, ) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send

Source

fn detach(self) -> Id

Provided Methods§

Source

fn cancel_and_join( self, ) -> impl Future<Output = Result<Response<<O as OperationDeclaration>::Response>, Self::Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§