pub trait TnuaScheme:
'static
+ Send
+ Sync
+ Sized {
type Basis: TnuaBasis;
type Config: TnuaSchemeConfig<Scheme = Self> + Asset;
type ActionDiscriminant: TnuaActionDiscriminant;
type ActionState: TnuaActionState<Basis = Self::Basis, Discriminant = Self::ActionDiscriminant>;
// Required method
fn discriminant(&self) -> Self::ActionDiscriminant;
}Expand description
See the derive macro.
Required Associated Types§
Sourcetype Basis: TnuaBasis
type Basis: TnuaBasis
The base motion controller of the character. Typically
TnuaBuiltinWalk
Sourcetype Config: TnuaSchemeConfig<Scheme = Self> + Asset
type Config: TnuaSchemeConfig<Scheme = Self> + Asset
A big configuration struct, containing the configuration of the basis and of all the actions.
Sourcetype ActionDiscriminant: TnuaActionDiscriminant
type ActionDiscriminant: TnuaActionDiscriminant
An enum with a unit variant for each variant of the control scheme.
Sourcetype ActionState: TnuaActionState<Basis = Self::Basis, Discriminant = Self::ActionDiscriminant>
type ActionState: TnuaActionState<Basis = Self::Basis, Discriminant = Self::ActionDiscriminant>
An enum mirroring the control scheme, except instead of just having the input of each
action each variant has a TnuaActionState which contains the action’s input,
configuration and memoery. If the variant in the control scheme has payload, they are
copied to the variant in action state as is.
Required Methods§
Sourcefn discriminant(&self) -> Self::ActionDiscriminant
fn discriminant(&self) -> Self::ActionDiscriminant
The action without the input and payloads.
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.