Trait enso_flexer::prelude::AnyLogger [−][src]
pub trait AnyLogger { type Owned; fn new(path: impl Into<ImString>) -> Self::Owned; fn path(&self) -> &str; fn sub(logger: impl AnyLogger, id: impl AsRef<str>) -> Self::Owned
where
Self::Owned: AnyLogger,
<Self::Owned as AnyLogger>::Owned == Self::Owned, { ... } }
Expand description
A common interface for all loggers. Exposing all information needed to create a particular sub-logger from a given parent logger of any type.
Associated Types
type Owned
[src]
Expand description
The owned type of this logger. As this trait is implemented for logger references, this dependent type just removes the references in this case.
Required methods
fn new(path: impl Into<ImString>) -> Self::Owned
[src]
Expand description
Constructor.
fn path(&self) -> &str
[src]
Expand description
Path that is used as an unique identifier of this logger.
Provided methods
fn sub(logger: impl AnyLogger, id: impl AsRef<str>) -> Self::Owned where
Self::Owned: AnyLogger,
<Self::Owned as AnyLogger>::Owned == Self::Owned,
[src]
Self::Owned: AnyLogger,
<Self::Owned as AnyLogger>::Owned == Self::Owned,
Expand description
Creates a new logger with this logger as a parent. It can be useful when we need to create a sub-logger for a generic type parameter.
Implementations on Foreign Types
Loading content...Implementors
Loading content...