pub trait Queueable: AsyncWrite {
// Required methods
fn queue(
&mut self,
command: impl Command,
) -> Result<CommandQueue<&mut Self>, Error>;
fn queue_many(
&mut self,
command: impl Commands,
) -> Result<CommandQueue<&mut Self>, Error>;
}Available on crate feature
term only.Expand description
Starts an asynchronous command queue for a writer.
Required Methods§
Sourcefn queue(
&mut self,
command: impl Command,
) -> Result<CommandQueue<&mut Self>, Error>
fn queue( &mut self, command: impl Command, ) -> Result<CommandQueue<&mut Self>, Error>
Creates a queue that borrows this writer and adds command to it.
No bytes are written until CommandQueue::flush is awaited.
Sourcefn queue_many(
&mut self,
command: impl Commands,
) -> Result<CommandQueue<&mut Self>, Error>
fn queue_many( &mut self, command: impl Commands, ) -> Result<CommandQueue<&mut Self>, Error>
Adds an ordered batch of commands without writing to the underlying writer.
If any command cannot render its ANSI representation, this method removes every byte added by this call. Commands that were already queued remain intact.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".