pub struct BrinkHandler<'a, M: Send + Sync + 'static = ()> { /* private fields */ }Expand description
An ExternalFnHandler backed by a BrinkBindings registry.
Resolves pure-function bindings inline and buffers command-event
triggers (it has no World access mid-step). After stepping, call
flush to drain the buffered triggers into a
Commands queue. Unknown names fall through to
ExternalResult::Fallback so the in-story fallback body (if any)
runs.
Implementations§
Source§impl<M: Send + Sync + 'static> BrinkHandler<'_, M>
impl<M: Send + Sync + 'static> BrinkHandler<'_, M>
Sourcepub fn flush(self, commands: &mut Commands<'_, '_>)
pub fn flush(self, commands: &mut Commands<'_, '_>)
Drain buffered command-event triggers into commands. Call once
after the flow’s step method returns (the borrow of self taken
by stepping has ended by then). Consumes the handler.
Sourcepub fn queued_len(&self) -> usize
pub fn queued_len(&self) -> usize
Number of command triggers buffered so far (for tests/diagnostics).
Trait Implementations§
Source§impl<M: Send + Sync + 'static> ExternalFnHandler for BrinkHandler<'_, M>
impl<M: Send + Sync + 'static> ExternalFnHandler for BrinkHandler<'_, M>
Auto Trait Implementations§
impl<'a, M = ()> !Freeze for BrinkHandler<'a, M>
impl<'a, M = ()> !RefUnwindSafe for BrinkHandler<'a, M>
impl<'a, M = ()> !Sync for BrinkHandler<'a, M>
impl<'a, M = ()> !UnwindSafe for BrinkHandler<'a, M>
impl<'a, M> Send for BrinkHandler<'a, M>where
&'a BrinkBindings<M>: Send,
impl<'a, M> Unpin for BrinkHandler<'a, M>where
&'a BrinkBindings<M>: Unpin,
impl<'a, M> UnsafeUnpin for BrinkHandler<'a, M>where
&'a BrinkBindings<M>: UnsafeUnpin,
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
impl<T> ConditionalSend for Twhere
T: Send,
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.