pub struct NoneEvent;
Expand description
NoneEvent is a semi-private event struct that is used to allow the
Initializer
trait implementations to provide a simple API to initialise a
new machine.
Using this struct, the following works:
ⓘ
let sm = TurnStile::new(Locked); // => TurnStile<Locked, None>
Otherwise, we’d need to provide type annotations (using any available events) for every machine invocation:
ⓘ
let sm: TurnStile<Locked, Push> = TurnStile::new(Locked); // => TurnStile<Locked, None>
In practice, you will never deal with this struct, as it’s used as a
concrete type that is swapped for the None
option at compile time.
Trait Implementations§
impl Copy for NoneEvent
impl Eq for NoneEvent
impl Event for NoneEvent
impl StructuralPartialEq for NoneEvent
Auto Trait Implementations§
impl Freeze for NoneEvent
impl RefUnwindSafe for NoneEvent
impl Send for NoneEvent
impl Sync for NoneEvent
impl Unpin for NoneEvent
impl UnwindSafe for NoneEvent
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