pub enum SystemOrdering {
Before {
system: SystemId,
before: SystemId,
},
After {
system: SystemId,
after: SystemId,
},
}Expand description
Specifies an ordering constraint between two systems.
Ordering constraints are used to ensure systems run in a specific order, regardless of the order they were added to the stage.
§Example
use goud_engine::ecs::schedule::SystemOrdering;
use goud_engine::ecs::system::SystemId;
let ordering = SystemOrdering::Before {
system: SystemId::from_raw(1),
before: SystemId::from_raw(2),
};Variants§
Implementations§
Source§impl SystemOrdering
impl SystemOrdering
Sourcepub fn before(system: SystemId, other: SystemId) -> Self
pub fn before(system: SystemId, other: SystemId) -> Self
Creates a constraint where system runs before other.
Sourcepub fn after(system: SystemId, other: SystemId) -> Self
pub fn after(system: SystemId, other: SystemId) -> Self
Creates a constraint where system runs after other.
Sourcepub fn first(&self) -> SystemId
pub fn first(&self) -> SystemId
Returns the system that must run first according to this constraint.
Sourcepub fn second(&self) -> SystemId
pub fn second(&self) -> SystemId
Returns the system that must run second according to this constraint.
Trait Implementations§
Source§impl Clone for SystemOrdering
impl Clone for SystemOrdering
Source§fn clone(&self) -> SystemOrdering
fn clone(&self) -> SystemOrdering
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SystemOrdering
impl Debug for SystemOrdering
Source§impl Display for SystemOrdering
impl Display for SystemOrdering
Source§impl Hash for SystemOrdering
impl Hash for SystemOrdering
Source§impl PartialEq for SystemOrdering
impl PartialEq for SystemOrdering
impl Copy for SystemOrdering
impl Eq for SystemOrdering
impl StructuralPartialEq for SystemOrdering
Auto Trait Implementations§
impl Freeze for SystemOrdering
impl RefUnwindSafe for SystemOrdering
impl Send for SystemOrdering
impl Sync for SystemOrdering
impl Unpin for SystemOrdering
impl UnsafeUnpin for SystemOrdering
impl UnwindSafe for SystemOrdering
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more