pub struct StateMachineExecutor { /* private fields */ }Expand description
State machine executor with event batching.
Processes multiple events efficiently with minimal overhead.
Implementations§
Source§impl StateMachineExecutor
impl StateMachineExecutor
Sourcepub fn queue(&mut self, conn_id: u64, event: ConnectionEvent)
pub fn queue(&mut self, conn_id: u64, event: ConnectionEvent)
Queue an event for processing.
Sourcepub fn process(
&mut self,
pool: &mut ConnectionPool,
) -> Vec<(u64, TransitionAction)>
pub fn process( &mut self, pool: &mut ConnectionPool, ) -> Vec<(u64, TransitionAction)>
Process all queued events against a connection pool.
Sourcepub fn process_with<F>(&mut self, pool: &mut ConnectionPool, callback: F)
pub fn process_with<F>(&mut self, pool: &mut ConnectionPool, callback: F)
Process events with a callback for each action.
Sourcepub fn has_pending(&self) -> bool
pub fn has_pending(&self) -> bool
Check if executor has pending events.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Get pending event count.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StateMachineExecutor
impl RefUnwindSafe for StateMachineExecutor
impl Send for StateMachineExecutor
impl Sync for StateMachineExecutor
impl Unpin for StateMachineExecutor
impl UnwindSafe for StateMachineExecutor
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> Injectable for T
impl<T> Injectable for T
Source§fn type_id_of() -> TypeIdwhere
Self: Sized,
fn type_id_of() -> TypeIdwhere
Self: Sized,
Returns the TypeId of this type (for internal use)
Source§fn type_name_of() -> &'static strwhere
Self: Sized,
fn type_name_of() -> &'static strwhere
Self: Sized,
Returns the type name for debugging