Skip to main content

Session

Trait Session 

Source
pub trait Session {
    // Required method
    fn with<R>(
        &mut self,
        f: impl FnOnce(&mut Ctx<'_>) -> R,
    ) -> Result<R, String>;
}
Expand description

This machine’s side: its sync state, lent to one closure at a time.

Required Methods§

Source

fn with<R>(&mut self, f: impl FnOnce(&mut Ctx<'_>) -> R) -> Result<R, String>

Runs f with this machine’s state, or says why it could not be had (the store is busy, say): f did not run.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§