Skip to main content

Pending

Trait Pending 

Source
pub trait Pending: Sized {
    type Session: Session<Pending = Self>;

    // Required methods
    fn resume(
        stopped: Stopped<Self, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>,
        report: impl FnMut(Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>),
    ) -> Result<Self, Stopped<Self, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>>;
    fn cancel(
        self,
    ) -> Result<Self::Session, Stopped<State<Self::Session, <Self::Session as Session>::Pending>, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>>;
}
Expand description

A live session permits cancellation without exposing mutable owner access.

Required Associated Types§

Source

type Session: Session<Pending = Self>

Required Methods§

Source

fn resume( stopped: Stopped<Self, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>, report: impl FnMut(Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>), ) -> Result<Self, Stopped<Self, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>>

Reports the prior failure before acknowledging its exact unread completion.

Source

fn cancel( self, ) -> Result<Self::Session, Stopped<State<Self::Session, <Self::Session as Session>::Pending>, Cause<<Self::Session as Session>::Probe, <<Self::Session as Session>::Outcome as Outcome>::Observation, <Self::Session as Session>::Error>>>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§