Struct logged_stream::ChannelLogger
source · pub struct ChannelLogger { /* private fields */ }Expand description
This implementation of Logger trait sends log records (Record) by the sending-half of underlying
asynchronous channel. You are able to take receiving-half using take_receiver and take_receiver_unchecked
methods.
Implementations§
source§impl ChannelLogger
impl ChannelLogger
sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new instance of ChannelLogger.
sourcepub fn take_receiver(&mut self) -> Option<Receiver<Record>>
pub fn take_receiver(&mut self) -> Option<Receiver<Record>>
Take channel receiving-half. Returns None if it was already taken.
sourcepub fn take_receiver_unchecked(&mut self) -> Receiver<Record>
pub fn take_receiver_unchecked(&mut self) -> Receiver<Record>
Take channel receiving-half. Panics if it was already taken.
Trait Implementations§
source§impl Debug for ChannelLogger
impl Debug for ChannelLogger
source§impl Default for ChannelLogger
impl Default for ChannelLogger
Auto Trait Implementations§
impl RefUnwindSafe for ChannelLogger
impl Send for ChannelLogger
impl !Sync for ChannelLogger
impl Unpin for ChannelLogger
impl UnwindSafe for ChannelLogger
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