pub struct DebugContext { /* private fields */ }Expand description
Debug context for a transpilation session
Implementations§
Source§impl DebugContext
impl DebugContext
pub fn new(level: DebugLevel) -> Self
pub fn set_level(&mut self, level: DebugLevel)
pub fn log(&self, entry_level: DebugLevel, message: impl Into<String>)
pub fn log_at( &self, entry_level: DebugLevel, message: impl Into<String>, line: Option<usize>, column: Option<usize>, )
pub fn error(&self, msg: impl Into<String>)
pub fn warn(&self, msg: impl Into<String>)
pub fn info(&self, msg: impl Into<String>)
pub fn trace(&self, msg: impl Into<String>)
pub fn verbose(&self, msg: impl Into<String>)
pub fn get_logs(&self) -> Vec<DebugEntry>
pub fn clear_logs(&self)
pub fn format_logs(&self) -> String
Trait Implementations§
Source§impl Clone for DebugContext
impl Clone for DebugContext
Auto Trait Implementations§
impl Freeze for DebugContext
impl RefUnwindSafe for DebugContext
impl Send for DebugContext
impl Sync for DebugContext
impl Unpin for DebugContext
impl UnwindSafe for DebugContext
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