Struct CommandQueue

Source
pub struct CommandQueue<TCommand> { /* private fields */ }

Implementations§

Source§

impl<TCommand> CommandQueue<TCommand>

Source

pub fn new(cur_resource_id: usize) -> CommandQueue<TCommand>

Source

pub fn run<TInterpreter: Interpreter<TCommand>>( &mut self, interpreter: &mut TInterpreter, ) -> Result<(), TInterpreter::ErrorType>

Execute all commands contained in this command queue with the given interpreter

§Arguments
  • interpreter - The command interpreter
Source

pub fn push(&mut self, cmd: TCommand) -> usize

Push a new command into this command queue

§Arguments
  • resid - Resource id of the command to be processed
  • cmd - The command to execute
§Returns

command resource id to reference the output in subsequent commands

Source

pub fn get_last_resource_id(&self) -> usize

Gets the last resource index

Auto Trait Implementations§

§

impl<TCommand> Freeze for CommandQueue<TCommand>

§

impl<TCommand> RefUnwindSafe for CommandQueue<TCommand>
where TCommand: RefUnwindSafe,

§

impl<TCommand> Send for CommandQueue<TCommand>
where TCommand: Send,

§

impl<TCommand> Sync for CommandQueue<TCommand>
where TCommand: Sync,

§

impl<TCommand> Unpin for CommandQueue<TCommand>
where TCommand: Unpin,

§

impl<TCommand> UnwindSafe for CommandQueue<TCommand>
where TCommand: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.