Skip to main content

SMut

Trait SMut 

Source
pub trait SMut: SRef + MayTransition {
    // Required method
    fn s_mut<T, State>(inner: &mut Self::Inner<T, State>) -> &mut T
       where T: StateMachineImpl;
}
Expand description

Storage backend that can expose a mutable runtime reference.

Use S: SMut for methods that mutate runtime data or call transition!. Transition effect bodies always receive &mut T, so a transition method normally needs this bound even if the body is empty.

Required Methods§

Source

fn s_mut<T, State>(inner: &mut Self::Inner<T, State>) -> &mut T

Mutably borrows the runtime implementation from this storage backend.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl SMut for StorageStateOwned

Source§

impl SMut for StorageStateOwnedBox

Source§

impl<'a, Backend> SMut for StorageStateMut<'a, Backend>
where Backend: SharedStorageView + 'a,