pub struct Machine<'d, D: Session<'d>> { /* private fields */ }Expand description
Exact session owner with one mutually exclusive input/output slot.
Implementations§
Source§impl<'d, D: Session<'d>> Machine<'d, D>
impl<'d, D: Session<'d>> Machine<'d, D>
pub fn new(inner: D) -> Self
Sourcepub fn input(&mut self) -> Access<Input<'_, 'd, D>>
pub fn input(&mut self) -> Access<Input<'_, 'd, D>>
Validates the one callback slot and binds vacancy to this borrow.
pub const fn access(&self) -> Access<()>
pub const fn progress(&self) -> Progress
pub const fn output(&self) -> &Output
pub const fn hold(&self) -> Hold
Sourcepub fn finish<I>(
&mut self,
owner: I,
) -> Result<(Finish<'_, 'd, D>, I), (FinishError, I)>
pub fn finish<I>( &mut self, owner: I, ) -> Result<(Finish<'_, 'd, D>, I), (FinishError, I)>
Binds an orderly-input finish while preserving the caller’s exact owner on both transition outcomes.
Auto Trait Implementations§
impl<'d, D> !RefUnwindSafe for Machine<'d, D>
impl<'d, D> !Send for Machine<'d, D>
impl<'d, D> !Sync for Machine<'d, D>
impl<'d, D> !UnwindSafe for Machine<'d, D>
impl<'d, D> Forget for Machine<'d, D>
impl<'d, D> Freeze for Machine<'d, D>where
D: Freeze,
impl<'d, D> Unpin for Machine<'d, D>where
D: Unpin,
impl<'d, D> UnsafeUnpin for Machine<'d, D>where
D: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more