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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Scope<'a>
impl<'a> RefUnwindSafe for Scope<'a>
impl<'a> Send for Scope<'a>
impl<'a> Sync for Scope<'a>
impl<'a> Unpin for Scope<'a>
impl<'a> UnwindSafe for Scope<'a>
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