Trait bevy::ecs::schedule::ScheduleLabel

pub trait ScheduleLabel: 'static + Send + Sync + Debug {
    // Required methods
    fn dyn_clone(&self) -> Box<dyn ScheduleLabel>;
    fn as_dyn_eq(&self) -> &(dyn DynEq + 'static);
    fn dyn_hash(&self, state: &mut dyn Hasher);

    // Provided method
    fn intern(&self) -> Interned<dyn ScheduleLabel>
       where Self: Sized { ... }
}
Expand description

A strongly-typed class of labels used to identify a Schedule.

Required Methods§

fn dyn_clone(&self) -> Box<dyn ScheduleLabel>

Clones this ScheduleLabel.

fn as_dyn_eq(&self) -> &(dyn DynEq + 'static)

Casts this value to a form where it can be compared with other type-erased values.

fn dyn_hash(&self, state: &mut dyn Hasher)

Feeds this value into the given Hasher.

Provided Methods§

fn intern(&self) -> Interned<dyn ScheduleLabel>
where Self: Sized,

Returns an Interned value corresponding to self.

Examples found in repository?
examples/games/stepping.rs (line 23)
22
23
24
25
    pub fn add_schedule(mut self, label: impl ScheduleLabel) -> SteppingPlugin {
        self.schedule_labels.push(label.intern());
        self
    }

Trait Implementations§

§

impl Hash for dyn ScheduleLabel

§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
§

impl Internable for dyn ScheduleLabel

§

fn leak(&self) -> &'static dyn ScheduleLabel

Creates a static reference to self, possibly leaking memory.
§

fn ref_eq(&self, other: &(dyn ScheduleLabel + 'static)) -> bool

Returns true if the two references point to the same value.
§

fn ref_hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds the reference to the hasher.
§

impl PartialEq for dyn ScheduleLabel

§

fn eq(&self, other: &(dyn ScheduleLabel + 'static)) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for dyn ScheduleLabel

Implementors§

§

impl ScheduleLabel for First
where First: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedFirst
where FixedFirst: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedLast
where FixedLast: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedMain
where FixedMain: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedPostUpdate
where FixedPostUpdate: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedPreUpdate
where FixedPreUpdate: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for FixedUpdate
where FixedUpdate: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Last
where Last: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Main
where Main: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for PostStartup
where PostStartup: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for PostUpdate
where PostUpdate: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for PreStartup
where PreStartup: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for PreUpdate
where PreUpdate: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for RunFixedMainLoop
where RunFixedMainLoop: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for SpawnScene
where SpawnScene: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Startup
where Startup: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Update
where Update: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for ExtractSchedule
where ExtractSchedule: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Render
where Render: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for StateTransition
where StateTransition: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl ScheduleLabel for Interned<dyn ScheduleLabel>

§

impl<S> ScheduleLabel for OnEnter<S>
where S: States, OnEnter<S>: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl<S> ScheduleLabel for OnExit<S>
where S: States, OnExit<S>: 'static + Send + Sync + Clone + Eq + Debug + Hash,

§

impl<S> ScheduleLabel for OnTransition<S>
where S: States, OnTransition<S>: 'static + Send + Sync + Clone + Eq + Debug + Hash,