pub enum LoggerName<'a> {
Validated(&'a CString),
Unvalidated(&'a str),
}
Expand description
This is used to borrow a logger name which might be validated (e.g. came
from a Logger
struct) or not (e.g. a user-defined &str
). If an
unvalidated logger name is used with one of the logging macros, we will log
an error about it, and the original log message will be logged with the
default logger.
Variants§
Validated(&'a CString)
The logger name is already available as a valid CString
Unvalidated(&'a str)
The logger name has not been validated yet
Trait Implementations§
Source§impl<'a> Clone for LoggerName<'a>
impl<'a> Clone for LoggerName<'a>
Source§fn clone(&self) -> LoggerName<'a>
fn clone(&self) -> LoggerName<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a> Debug for LoggerName<'a>
impl<'a> Debug for LoggerName<'a>
impl<'a> Copy for LoggerName<'a>
Auto Trait Implementations§
impl<'a> Freeze for LoggerName<'a>
impl<'a> RefUnwindSafe for LoggerName<'a>
impl<'a> Send for LoggerName<'a>
impl<'a> Sync for LoggerName<'a>
impl<'a> Unpin for LoggerName<'a>
impl<'a> UnwindSafe for LoggerName<'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