Skip to main content

SRef

Trait SRef 

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

Storage backend that can expose a runtime reference.

Use S: SRef for methods that only read the runtime implementation. This bound covers owned states, boxed/pinned states, and read or write guards from shared storage.

Required Methods§

Source

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

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 SRef for StorageStateOwned

Source§

impl SRef for StorageStateOwnedBox

Source§

impl SRef for StorageStateOwnedPinBox

Available on crate feature alloc only.
Source§

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

Source§

impl<'a, Backend> SRef for StorageStateRef<'a, Backend>
where Backend: SharedStorageView + 'a,