pub struct UndoScheduler<'w, E: Event + Clone> { /* private fields */ }Implementations§
Source§impl<'w, E: Event + Clone> UndoScheduler<'w, E>
impl<'w, E: Event + Clone> UndoScheduler<'w, E>
Sourcepub fn register(&mut self, event: E)
pub fn register(&mut self, event: E)
Register the undo-event in the registered area.
Events can registered multiple, and when UndoRequester::undo is called,
last registered will sent
Sourcepub fn reserve(&mut self, event: E)
pub fn reserve(&mut self, event: E)
Place the undo-event in the reserved area.
Events is in placed on same reserved area until reserve_commit is called.
This method is useful when want to sent multiple undo-event with single call UndoRequest::undo .
Sourcepub fn register_all_reserved(&mut self)
pub fn register_all_reserved(&mut self)
Moves all events placed on the reserved area by reserve to the registered area.
Source§impl<'w, E: Event + Clone + Default> UndoScheduler<'w, E>
impl<'w, E: Event + Clone + Default> UndoScheduler<'w, E>
Sourcepub fn register_default(&mut self)
pub fn register_default(&mut self)
Register the undo-event in the registered area with default value.
Events can registered multiple, and when UndoRequester::undo is called,
last registered will sent
Sourcepub fn reserve_default(&mut self)
pub fn reserve_default(&mut self)
Place the undo-event in the reserved area with default value.
Events is in placed on same reserved area until reserve_commit is called.
This method is useful when want to sent multiple undo-event with single call UndoRequest::undo .
Trait Implementations§
Source§impl<E: Event + Clone> SystemParam for UndoScheduler<'_, E>
impl<E: Event + Clone> SystemParam for UndoScheduler<'_, E>
Source§type Item<'w, 's> = UndoScheduler<'w, E>
type Item<'w, 's> = UndoScheduler<'w, E>
Self, instantiated with new lifetimes. Read moreSource§fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State
fn init_state(world: &mut World, system_meta: &mut SystemMeta) -> Self::State
World access used by this SystemParam
and creates a new instance of this param’s State.Source§fn new_archetype(
state: &mut Self::State,
archetype: &Archetype,
system_meta: &mut SystemMeta,
)
fn new_archetype( state: &mut Self::State, archetype: &Archetype, system_meta: &mut SystemMeta, )
Archetype, registers the components accessed by this SystemParam (if applicable).Source§fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
fn apply(state: &mut Self::State, system_meta: &SystemMeta, world: &mut World)
SystemParam’s state.
This is used to apply Commands during apply_deferred.Source§unsafe fn get_param<'w, 's>(
state: &'s mut Self::State,
system_meta: &SystemMeta,
world: UnsafeWorldCell<'w>,
change_tick: Tick,
) -> Self::Item<'w, 's>
unsafe fn get_param<'w, 's>( state: &'s mut Self::State, system_meta: &SystemMeta, world: UnsafeWorldCell<'w>, change_tick: Tick, ) -> Self::Item<'w, 's>
SystemParamFunction. Read moreimpl<'w, 's, E: Event + Clone> ReadOnlySystemParam for UndoScheduler<'w, E>where
ResMut<'w, UndoCounter>: ReadOnlySystemParam,
ResMut<'w, UndoReservedArea<E>>: ReadOnlySystemParam,
ResMut<'w, ReserveCounter>: ReadOnlySystemParam,
EventWriter<'w, UndoEvent<E>>: ReadOnlySystemParam,
EventWriter<'w, RequestCommitReservationsFromSchedulerEvent>: ReadOnlySystemParam,
Auto Trait Implementations§
impl<'w, E> Freeze for UndoScheduler<'w, E>
impl<'w, E> RefUnwindSafe for UndoScheduler<'w, E>where
E: RefUnwindSafe,
impl<'w, E> Send for UndoScheduler<'w, E>
impl<'w, E> Sync for UndoScheduler<'w, E>
impl<'w, E> Unpin for UndoScheduler<'w, E>
impl<'w, E> !UnwindSafe for UndoScheduler<'w, E>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.