pub(crate) struct CommandExecutionContext<S>where
S: ExecutionCommandSource,{
command_limit: usize,
fork_limit: usize,
queue_limit: usize,
command_quota: usize,
queue_overflow: bool,
command_queue: VecDeque<CommandQueueEntry<S>>,
new_top_commands: Vec<CommandQueueEntry<S>>,
suspension: Option<ActiveSuspension<S>>,
current_frame_depth: usize,
}Expand description
Vanilla-style command action queue retained only while explicitly suspended.
Fields§
§command_limit: usize§fork_limit: usize§queue_limit: usize§command_quota: usize§queue_overflow: bool§command_queue: VecDeque<CommandQueueEntry<S>>§new_top_commands: Vec<CommandQueueEntry<S>>§suspension: Option<ActiveSuspension<S>>§current_frame_depth: usizeImplementations§
Source§impl<S> CommandExecutionContext<S>where
S: ExecutionCommandSource,
impl<S> CommandExecutionContext<S>where
S: ExecutionCommandSource,
pub(crate) fn new(command_limit: usize, fork_limit: usize) -> Self
pub(crate) fn queue_initial_command( &mut self, chain: ContextChain<S, SteelCommandRuntime>, source: S, return_value_consumer: CommandResultCallback, )
pub(crate) fn run(&mut self) -> ExecutionStop
Sourcepub(crate) fn poll_suspension(&mut self) -> ExecutionStop
pub(crate) fn poll_suspension(&mut self) -> ExecutionStop
Polls the active suspension once and resumes the retained queue when it is ready.
pub(crate) fn suspension_order(&self) -> Option<CommandSuspensionOrder>
Sourcepub(crate) fn cancel(&mut self)
pub(crate) fn cancel(&mut self)
Cancels active and queued suspension work and discards the retained command queue.
pub(crate) const fn fork_limit(&self) -> usize
pub(crate) const fn increment_cost(&mut self)
const fn create_top_frame( &self, return_value_consumer: CommandResultCallback, ) -> Frame
fn queue_next(&mut self, frame: Frame, action: impl EntryAction<S>)
fn queue_boxed(&mut self, frame: Frame, action: Box<dyn EntryAction<S>>)
fn queue_entry(&mut self, entry: CommandQueueEntry<S>)
fn push_new_commands(&mut self)
fn discard(&mut self, frame: &Frame)
fn cancel_command_queue(&mut self)
fn cancel_new_top_commands(&mut self)
Source§impl CommandExecutionContext<CommandSource>
impl CommandExecutionContext<CommandSource>
pub(crate) fn for_source(source: &CommandSource) -> Self
Trait Implementations§
Source§impl<S> Drop for CommandExecutionContext<S>where
S: ExecutionCommandSource,
impl<S> Drop for CommandExecutionContext<S>where
S: ExecutionCommandSource,
Auto Trait Implementations§
impl<S> !RefUnwindSafe for CommandExecutionContext<S>
impl<S> !Sync for CommandExecutionContext<S>
impl<S> !UnwindSafe for CommandExecutionContext<S>
impl<S> Freeze for CommandExecutionContext<S>
impl<S> Send for CommandExecutionContext<S>
impl<S> Unpin for CommandExecutionContext<S>
impl<S> UnsafeUnpin for CommandExecutionContext<S>
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>