Trait rsonpath::result::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>

§

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,

§

type Error = Error