pub struct MultiHandle { /* private fields */ }Expand description
A handle returned by MultiLogBuilder::init or MultiLogBuilderWithHandles::init_with_handles
for managing the multi-log.
When created via init_with_handles, you can access per-writer LogHandles
to dynamically adjust their log levels via writer_handles
or writer_handle.
Implementations§
Source§impl MultiHandle
impl MultiHandle
Sourcepub fn max_level(&self) -> LevelFilter
pub fn max_level(&self) -> LevelFilter
Get the effective max level of the multi-log.
Sourcepub fn writer_handles(&self) -> Option<&[LogHandle]>
pub fn writer_handles(&self) -> Option<&[LogHandle]>
Get all per-writer handles.
Returns Some if the multi-log was created via init_with_handles
or build_with_handles. Each LogHandle can be used to
dynamically adjust the level of its corresponding writer.
Returns None if created via init() or build() (which don’t track handles).
Sourcepub fn writer_handle(&self, index: usize) -> Option<&LogHandle>
pub fn writer_handle(&self, index: usize) -> Option<&LogHandle>
Get a specific writer handle by index.
Returns None if out of bounds or if the multi-log was not created
with handle tracking.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MultiHandle
impl RefUnwindSafe for MultiHandle
impl Send for MultiHandle
impl Sync for MultiHandle
impl Unpin for MultiHandle
impl UnsafeUnpin for MultiHandle
impl UnwindSafe for MultiHandle
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