pub struct RxIntentExecutor;Expand description
Built-in executor for intent signals.
This is intentionally minimal scaffolding for the ongoing refactor described in:
- docs/signals.md
The goal is to keep handlers observers-only, and execute side effects via intent signals.
Implementations§
Source§impl RxIntentExecutor
impl RxIntentExecutor
pub fn new() -> Self
Sourcepub fn handles_value(value: &IntentValue) -> bool
pub fn handles_value(value: &IntentValue) -> bool
Returns whether this executor is expected to handle the given signal value.
Note: during migration, this is intentionally conservative; it is not yet wired into the drain loop.
Sourcepub fn execute(
&mut self,
world: &mut World,
render_assets: &mut RenderAssets,
emit: &mut dyn SignalEmitter,
env: &Signal,
)
pub fn execute( &mut self, world: &mut World, render_assets: &mut RenderAssets, emit: &mut dyn SignalEmitter, env: &Signal, )
Execute an intent signal, emitting follow-up mutation signals via emit.
Trait Implementations§
Source§impl Debug for RxIntentExecutor
impl Debug for RxIntentExecutor
Source§impl Default for RxIntentExecutor
impl Default for RxIntentExecutor
Source§fn default() -> RxIntentExecutor
fn default() -> RxIntentExecutor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RxIntentExecutor
impl RefUnwindSafe for RxIntentExecutor
impl Send for RxIntentExecutor
impl Sync for RxIntentExecutor
impl Unpin for RxIntentExecutor
impl UnsafeUnpin for RxIntentExecutor
impl UnwindSafe for RxIntentExecutor
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.