Struct slog_term::PlainDecorator [−][src]
Plain (no-op) Decorator
implementation
This decorator doesn’t do any coloring, and doesn’t do any synchronization
between threads, so is not Sync
. It is however useful combined with
slog_async::Async
drain, as slog_async::Async
uses only one thread,
and thus requires only Send
from Drain
s it wraps.
#[macro_use] extern crate slog; extern crate slog_term; extern crate slog_async; use slog::*; use slog_async::Async; fn main() { let decorator = slog_term::PlainDecorator::new(std::io::stdout()); let drain = Async::new( slog_term::FullFormat::new(decorator).build().fuse() ) .build() .fuse(); }
Implementations
impl<W> PlainDecorator<W> where
W: Write,
[src]
W: Write,
Trait Implementations
impl<W> Decorator for PlainDecorator<W> where
W: Write,
[src]
W: Write,
fn with_record<F>(
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
[src]
&self,
_record: &Record<'_>,
_logger_values: &OwnedKVList,
f: F
) -> Result<()> where
F: FnOnce(&mut dyn RecordDecorator) -> Result<()>,
Auto Trait Implementations
impl<W> !RefUnwindSafe for PlainDecorator<W>
impl<W> Send for PlainDecorator<W> where
W: Send,
W: Send,
impl<W> !Sync for PlainDecorator<W>
impl<W> Unpin for PlainDecorator<W> where
W: Unpin,
W: Unpin,
impl<W> UnwindSafe for PlainDecorator<W> where
W: UnwindSafe,
W: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,