pub trait Instance<O: OperationDeclaration>: Send + Sized {
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::Response>, Self::Error>> + Send;
fn detach(self) -> Id;
// Provided method
fn cancel_and_join(
self,
) -> impl Future<Output = Result<Response<O::Response>, Self::Error>> + Send { ... }
}Required Associated Types§
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::Response>, Self::Error>> + Send
fn detach(self) -> Id
Provided Methods§
fn cancel_and_join( self, ) -> impl Future<Output = Result<Response<O::Response>, Self::Error>> + Send
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".