pub trait SessionExt<This>{
// Required methods
fn attend(
&mut self,
running: &mut Vec<Attending<This::Id, This::Run, This::Moment>>,
);
fn attend_one(
&mut self,
attending: &mut Attending<This::Id, This::Run, This::Moment>,
) -> bool;
fn hold_still(
&self,
attending: &mut Attending<This::Id, This::Run, This::Moment>,
);
fn let_go(
&self,
attending: &mut Attending<This::Id, This::Run, This::Moment>,
);
fn running_for(
&self,
attending: &Attending<This::Id, This::Run, This::Moment>,
) -> Duration;
}Expand description
Derives one pass of attention from beginning, reading, holding, and ending runs.
Required Methods§
Sourcefn attend(
&mut self,
running: &mut Vec<Attending<This::Id, This::Run, This::Moment>>,
)
fn attend( &mut self, running: &mut Vec<Attending<This::Id, This::Run, This::Moment>>, )
Attends to every run once, then begins the work nobody has begun yet.
The order is the meaning. Ending comes before beginning, so leaving never races starting; a run is seen to be over before it is read, so everything it wrote before ending is read; and what it said is stated before how it ended, so nothing it said is lost to its ending.
Sourcefn attend_one(
&mut self,
attending: &mut Attending<This::Id, This::Run, This::Moment>,
) -> bool
fn attend_one( &mut self, attending: &mut Attending<This::Id, This::Run, This::Moment>, ) -> bool
Attends to one run, and states whether it is still running afterward.
Sourcefn hold_still(
&self,
attending: &mut Attending<This::Id, This::Run, This::Moment>,
)
fn hold_still( &self, attending: &mut Attending<This::Id, This::Run, This::Moment>, )
Holds one run still, and remembers when, so held time is not counted as running.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<This> SessionExt<This> for This
Derives one pass of attention from beginning, reading, holding, and ending runs.