spin_factors

Trait RuntimeFactorsInstanceState

Source
pub trait RuntimeFactorsInstanceState:
    AsInstanceState<Self>
    + Send
    + 'static {
    // Required methods
    fn get_with_table<F: Factor>(
        &mut self,
    ) -> Option<(&mut FactorInstanceState<F>, &mut ResourceTable)>;
    fn table(&self) -> &ResourceTable;
    fn table_mut(&mut self) -> &mut ResourceTable;

    // Provided method
    fn get<F: Factor>(&mut self) -> Option<&mut FactorInstanceState<F>> { ... }
}
Expand description

Get the state of a particular Factor from the overall InstanceState

Implemented by #[derive(RuntimeFactors)]

Required Methods§

Source

fn get_with_table<F: Factor>( &mut self, ) -> Option<(&mut FactorInstanceState<F>, &mut ResourceTable)>

Source

fn table(&self) -> &ResourceTable

Source

fn table_mut(&mut self) -> &mut ResourceTable

Provided Methods§

Source

fn get<F: Factor>(&mut self) -> Option<&mut FactorInstanceState<F>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§