Trait Sink

Source
pub trait Sink<D> {
    type Error: Error + Send + Sync + 'static;

    // Required method
    fn add_match(&mut self, data: D) -> Result<(), Self::Error>;
}
Expand description

Output sink consuming matches of the type D.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Error type that can be raised when consuming a match.

Required Methods§

Source

fn add_match(&mut self, data: D) -> Result<(), Self::Error>

Consume a single match of type D.

§Errors

An error depending on the implementor can be raised. For example, implementations using an underlying io::Write may raise an io::Error.

Implementations on Foreign Types§

Source§

impl<D> Sink<D> for Vec<D>

Source§

type Error = Infallible

Source§

fn add_match(&mut self, data: D) -> Result<(), Infallible>

Implementors§

Source§

impl<D> Sink<D> for NullSink

Source§

impl<D, W> Sink<D> for MatchWriter<W>
where D: Display, W: Write,