Struct qni_core_rs::console::ConsoleContext
source · pub struct ConsoleContext { /* private fields */ }
Expand description
Present ConsoleContext
Implementations
sourceimpl ConsoleContext
impl ConsoleContext
sourcepub fn append_command(&self, command: ProgramCommand)
pub fn append_command(&self, command: ProgramCommand)
Append console command
sourcepub fn export_command(&self, from: usize) -> Vec<ProgramCommand>
pub fn export_command(&self, from: usize) -> Vec<ProgramCommand>
Export command to Vec
sourcepub fn get_command_count(&self) -> usize
pub fn get_command_count(&self) -> usize
Get current command count
sourcepub fn get_cur_input_tag(&self) -> usize
pub fn get_cur_input_tag(&self) -> usize
Get current input tag
sourcepub fn on_recv_response(&self, res: ConsoleResponse)
pub fn on_recv_response(&self, res: ConsoleResponse)
Receive ConsoleResponse message
sourcepub fn try_get_req(&self) -> Option<ProgramRequest>
pub fn try_get_req(&self) -> Option<ProgramRequest>
Try get current ProgramRequest
sourcepub fn is_outdated_tag(&self, tag: usize) -> bool
pub fn is_outdated_tag(&self, tag: usize) -> bool
Check if tag is outdated
sourcepub fn wait_console(
&self,
req: ProgramRequest
) -> Result<Box<ConsoleResponse>, WaitError>
pub fn wait_console(
&self,
req: ProgramRequest
) -> Result<Box<ConsoleResponse>, WaitError>
Wait ConsoleResponse
Errors
If Console exited, tag is outdated, or request is expired, then error is returned
Auto Trait Implementations
impl RefUnwindSafe for ConsoleContext
impl Send for ConsoleContext
impl Sync for ConsoleContext
impl Unpin for ConsoleContext
impl UnwindSafe for ConsoleContext
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more