pub trait System<Args, Ret> {
// Required methods
fn execute(&mut self, context: &Context<'_>) -> Result<()>;
fn name(&self) -> SystemName;
fn borrows() -> Borrows;
// Provided method
fn named<S: Into<Cow<'static, str>>>(self, name: S) -> NamedSystem<Self>
where Self: Sized { ... }
}Expand description
Trait which defines any function or type that can operate on a world or other context.
Required Methods§
Sourcefn execute(&mut self, context: &Context<'_>) -> Result<()>
fn execute(&mut self, context: &Context<'_>) -> Result<()>
Executes the by borrowing from context
Sourcefn name(&self) -> SystemName
fn name(&self) -> SystemName
Returns the system name. Used for debug purposes
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.