SurroundingSeqAccept

Struct SurroundingSeqAccept 

Source
pub struct SurroundingSeqAccept<'o, O, Before, After> {
    pub output: &'o mut O,
    pub before: Before,
    pub after: After,
}
Expand description

A general purpose sequence acceptor that surrounds every element written with the “before” and “after” writable elements.

Fields§

§output: &'o mut O§before: Before§after: After

Implementations§

Source§

impl<'o, O, Before, After> SurroundingSeqAccept<'o, O, Before, After>

Source

pub fn new(output: &'o mut O, before: Before, after: After) -> Self

Trait Implementations§

Source§

impl<'o, O: Debug, Before: Debug, After: Debug> Debug for SurroundingSeqAccept<'o, O, Before, After>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'o, O, Before, After> SequenceAccept<O> for SurroundingSeqAccept<'o, O, Before, After>
where O: Output, Before: Writable<O>, After: Writable<O>,

Source§

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

Writes a single writable type to this sink.

Auto Trait Implementations§

§

impl<'o, O, Before, After> Freeze for SurroundingSeqAccept<'o, O, Before, After>
where Before: Freeze, After: Freeze,

§

impl<'o, O, Before, After> RefUnwindSafe for SurroundingSeqAccept<'o, O, Before, After>
where Before: RefUnwindSafe, After: RefUnwindSafe, O: RefUnwindSafe,

§

impl<'o, O, Before, After> Send for SurroundingSeqAccept<'o, O, Before, After>
where Before: Send, After: Send, O: Send,

§

impl<'o, O, Before, After> Sync for SurroundingSeqAccept<'o, O, Before, After>
where Before: Sync, After: Sync, O: Sync,

§

impl<'o, O, Before, After> Unpin for SurroundingSeqAccept<'o, O, Before, After>
where Before: Unpin, After: Unpin,

§

impl<'o, O, Before, After> !UnwindSafe for SurroundingSeqAccept<'o, O, Before, After>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.