pub trait TnuaActionSlots:
'static
+ Send
+ Sync {
type Scheme: TnuaScheme;
const ZEROES: Self;
// Required methods
fn rule_for(
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> TnuaActionCountingActionRule;
fn get_mut(
&mut self,
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> Option<&mut usize>;
fn get(
&self,
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> Option<usize>;
}Expand description
See the derive macro.
Required Associated Constants§
Required Associated Types§
Sourcetype Scheme: TnuaScheme
type Scheme: TnuaScheme
The scheme who’s actions are assigned to the slots.
Required Methods§
Sourcefn rule_for(
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> TnuaActionCountingActionRule
fn rule_for( action: <Self::Scheme as TnuaScheme>::ActionDiscriminant, ) -> TnuaActionCountingActionRule
Decision what to do when an action starts.
Sourcefn get_mut(
&mut self,
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> Option<&mut usize>
fn get_mut( &mut self, action: <Self::Scheme as TnuaScheme>::ActionDiscriminant, ) -> Option<&mut usize>
Get a mutable reference to the counter of the action’s slot.
Note that not all actions have slots. For actions not assigned to any slot, this will
return None.
Sourcefn get(
&self,
action: <Self::Scheme as TnuaScheme>::ActionDiscriminant,
) -> Option<usize>
fn get( &self, action: <Self::Scheme as TnuaScheme>::ActionDiscriminant, ) -> Option<usize>
Get the value of the counter of the action’s slot.
Note that not all actions have slots. For actions not assigned to any slot, this will
return None.
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.