Enum fast_logger::Logpass
source · pub enum Logpass {
Compatibility(Compatibility),
PassThrough(Box<dyn GenericLogger>),
}
Expand description
A passthrough-logger
This structure holds a reference to another logger and passes all messages along, the messages can only be of the type Generic.
Variants§
Compatibility(Compatibility)
Compatibility layer case, when using a Logpass in a library so you can, see GenericLogger::to_compatibility.
PassThrough(Box<dyn GenericLogger>)
Simple passthrough layer, used with GenericLogger::to_logpass to decouple print type dependencies.
Implementations§
source§impl Logpass
impl Logpass
sourcepub fn from_compatibility(compatibility: Compatibility) -> Self
pub fn from_compatibility(compatibility: Compatibility) -> Self
Turn a compatibility function into a Logpass
See Compatibility for examples.
Auto Trait Implementations§
impl !RefUnwindSafe for Logpass
impl !Send for Logpass
impl !Sync for Logpass
impl Unpin for Logpass
impl !UnwindSafe for Logpass
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