pub trait ModifKinds:
Display
+ Flags
+ Copy {
// Required method
fn lookup_modif(
name: &Token,
data: &Everything,
warn: Option<Severity>,
) -> Option<Self>;
// Provided method
fn require(self, other: Self, token: &Token) { ... }
}Expand description
All the things a modif can apply to. Many modifs are for multiple things, so this is a bitflags type.
This trait is used to warn when a modif is used inappropriately. For Imperator it is not yet known how important this is.
Required Methods§
Sourcefn lookup_modif(
name: &Token,
data: &Everything,
warn: Option<Severity>,
) -> Option<Self>
fn lookup_modif( name: &Token, data: &Everything, warn: Option<Severity>, ) -> Option<Self>
Returns Some(kinds) if the token is a valid modif or could be a valid modif if the appropriate item existed. Returns None otherwise.
Provided Methods§
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.