SequenceAccept

Trait SequenceAccept 

Source
pub trait SequenceAccept<O: Output> {
    // Required method
    async fn accept<W>(&mut self, writable: &W) -> Result<(), O::Error>
       where W: Writable<O>;
}
Expand description

A collector for multiple writable values. This trait is the ingredient to WritableSeq that represents how the sequence is handled. For example, accept can be implemented by adding commas after each element but not the last, which is what [common::CommaSeparated] does.

Required Methods§

Source

async fn accept<W>(&mut self, writable: &W) -> Result<(), O::Error>
where W: Writable<O>,

Writes a single writable type to this sink.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'o, O, Intro, Sep> SequenceAccept<O> for SeparatedSeqAccept<'o, O, Intro, Sep>
where O: Output, Intro: Writable<O>, Sep: Writable<O>,