[][src]Struct emit::pipeline::builder::PipelineBuilder

pub struct PipelineBuilder { /* fields omitted */ }

PipelineBuilder creates an event emitting pipeline. Calling init() will install the pipeline globally for use by the emit!() family of macros. Calling detach() will return an independent pipeline that can be used in isolation.

Methods

impl PipelineBuilder[src]

pub fn new() -> PipelineBuilder[src]

pub fn at_level(self, level: LogLevelFilter) -> Self[src]

Set the logging level used by the pipeline. The default is LogLevelFilter::Info.

pub fn pipe(self, element: Box<dyn Propagate + Sync>) -> Self[src]

Add a processing element to the pipeline. Elements run in the order in which they are added, so the output of one pipe()d element is fed into the next.

pub fn write_to<T: AcceptEvents + Sync + 'static>(self, collector: T) -> Self[src]

Write to a collector, synchronously.

pub fn send_to<T: AcceptEvents + Send + 'static>(self, collector: T) -> Self[src]

Send events to a collector, asynchronously. At present only one collector may receive events this way.

pub fn detach(self) -> (PipelineRef, AsyncFlushHandle)[src]

Build the pipeline, but don't globally install it.

pub fn init(self) -> AsyncFlushHandle[src]

Build and globally install the pipeline so that the emit!() macros can call it.

Auto Trait Implementations

impl !RefUnwindSafe for PipelineBuilder

impl !Send for PipelineBuilder

impl !Sync for PipelineBuilder

impl Unpin for PipelineBuilder

impl !UnwindSafe for PipelineBuilder

Blanket Implementations

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

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

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

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.