pub struct Trace {
pub events: Vec<TraceEvent>,
pub level: usize,
pub active: bool,
}
Expand description
the main structure hoding trace events. It must be declared and stored
in a thread level storage variable through the declare_trace!()
macro
Fields
events: Vec<TraceEvent>
level: usize
active: bool
Implementations
sourceimpl Trace
impl Trace
pub fn new() -> Self
pub fn reset(&mut self)
pub fn print(&self)
pub fn open<T>(&mut self, input: T, location: &'static str)where
Input: From<T>,
pub fn close_ok<T>(&mut self, input: T, location: &'static str, result: String)where
Input: From<T>,
pub fn close_error<T>(&mut self, input: T, location: &'static str, result: String)where
Input: From<T>,
pub fn close_failure<T>(
&mut self,
input: T,
location: &'static str,
result: String
)where
Input: From<T>,
pub fn close_incomplete<T>(
&mut self,
input: T,
location: &'static str,
needed: Needed
)where
Input: From<T>,
Auto Trait Implementations
impl RefUnwindSafe for Trace
impl !Send for Trace
impl !Sync for Trace
impl Unpin for Trace
impl UnwindSafe for Trace
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