[][src]Struct slog_term::PlainDecorator

pub struct PlainDecorator<W>(_)
where
    W: Write
;

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 Drains 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();
}

Methods

impl<W> PlainDecorator<W> where
    W: Write
[src]

pub fn new(io: W) -> Self[src]

Create PlainDecorator instance

Trait Implementations

impl<W> Decorator for PlainDecorator<W> where
    W: Write
[src]

Auto Trait Implementations

impl<W> Send for PlainDecorator<W> where
    W: Send

impl<W> Unpin for PlainDecorator<W> where
    W: Unpin

impl<W> !Sync for PlainDecorator<W>

impl<W> UnwindSafe for PlainDecorator<W> where
    W: UnwindSafe

impl<W> !RefUnwindSafe for PlainDecorator<W>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]