pub struct Scope<'a> { /* private fields */ }
Expand description
An RAII scope for log messages and error
s.
Implementations§
source§impl<'a> Scope<'a>
impl<'a> Scope<'a>
sourcepub fn new_indexed(name: &'a str, index: isize) -> Self
pub fn new_indexed(name: &'a str, index: isize) -> Self
Create a new logging scope with an index.
sourcepub fn with<T, Code: FnOnce() -> T>(name: &'a str, code: Code) -> T
pub fn with<T, Code: FnOnce() -> T>(name: &'a str, code: Code) -> T
Execute some code with in a named scope.
sourcepub fn with_indexed<T, Code: FnOnce() -> T>(
name: &'a str,
index: isize,
code: Code
) -> T
pub fn with_indexed<T, Code: FnOnce() -> T>(
name: &'a str,
index: isize,
code: Code
) -> T
Execute some code with in a named indexed scope.