pub struct BufferConsole {
pub out_buffer: Vec<Message>,
pub in_buffer: Vec<String>,
pub print_json: bool,
}Expand description
Implementation of Console storing all printed messages to a memory buffer
Fields§
§out_buffer: Vec<Message>§in_buffer: Vec<String>§print_json: boolImplementations§
Source§impl BufferConsole
impl BufferConsole
Trait Implementations§
Source§impl Console for BufferConsole
impl Console for BufferConsole
Source§fn print(&mut self, level: LogLevel, args: Markup<'_>)
fn print(&mut self, level: LogLevel, args: Markup<'_>)
Prints a message (formatted using markup!) to the console.
Source§fn print_raw(&mut self, level: LogLevel, content: &str)
fn print_raw(&mut self, level: LogLevel, content: &str)
Prints source text without markup rendering or terminal sanitization. Read more
Source§fn read(&mut self) -> Option<String>
fn read(&mut self) -> Option<String>
It reads from a source, and if this source contains something, it’s converted into a String
Source§impl Debug for BufferConsole
impl Debug for BufferConsole
Source§impl Default for BufferConsole
impl Default for BufferConsole
Source§fn default() -> BufferConsole
fn default() -> BufferConsole
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BufferConsole
impl RefUnwindSafe for BufferConsole
impl Send for BufferConsole
impl Sync for BufferConsole
impl Unpin for BufferConsole
impl UnsafeUnpin for BufferConsole
impl UnwindSafe for BufferConsole
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> ConsoleExt for T
impl<T> ConsoleExt for T
Source§fn error(&mut self, args: Markup<'_>)
fn error(&mut self, args: Markup<'_>)
Prints a piece of markup with level LogLevel::Error
Source§fn log(&mut self, args: Markup<'_>)
fn log(&mut self, args: Markup<'_>)
Prints a piece of markup with level LogLevel::Log Read more
Source§fn append(&mut self, args: Markup<'_>)
fn append(&mut self, args: Markup<'_>)
Prints a piece of markup with level LogLevel::Log Read more
Source§fn append_raw(&mut self, content: &str)
fn append_raw(&mut self, content: &str)
Prints a piece of source text with level LogLevel::Log. Read more