pub struct ConsoleWindow { /* private fields */ }
Expand description
Console Window
Implementations§
Source§impl ConsoleWindow
impl ConsoleWindow
Sourcepub fn draw(&mut self, ui: &mut Ui) -> ConsoleEvent
pub fn draw(&mut self, ui: &mut Ui) -> ConsoleEvent
Sourcepub fn write(&mut self, data: &str)
pub fn write(&mut self, data: &str)
Write a line to the console
§Arguments
data
- the string to write
Note that you can call this without the user having typed anything.
Sourcepub fn load_history(&mut self, history: Lines<'_>)
pub fn load_history(&mut self, history: Lines<'_>)
Sourcepub fn get_history(&self) -> VecDeque<String>
pub fn get_history(&self) -> VecDeque<String>
Sourcepub fn clear_history(&mut self)
pub fn clear_history(&mut self)
Clear the history of the console
Sourcepub fn command_table_mut(&mut self) -> &mut Vec<String>
pub fn command_table_mut(&mut self) -> &mut Vec<String>
get mut ref to tab completion table for commands
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConsoleWindow
impl RefUnwindSafe for ConsoleWindow
impl Send for ConsoleWindow
impl Sync for ConsoleWindow
impl Unpin for ConsoleWindow
impl UnwindSafe for ConsoleWindow
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> 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 more