Struct Then

Source
pub struct Then<A, B, F> { /* private fields */ }

Trait Implementations§

Source§

impl<A: Encoder, B: Encoder, F: FnMut() -> B> Encoder for Then<A, B, F>

Source§

fn encoded_chunk(&self) -> &[u8]

Provides next chunk of encoded bytes. Read more
Source§

fn next(&mut self) -> bool

Advances the state to get the next chunk of encoded bytes. Read more
Source§

fn track_position(self) -> EncoderPositionTracker<Self>

Returns a wrapper that tracks the position of processed bytes. Read more
Source§

fn write_to_slice(self, buf: &mut &mut [u8]) -> Result<(), BufferOverflow>

Source§

fn write_to_vec(self, buf: &mut Vec<u8>)

Available on crate feature alloc only.
Writes all encoded bytes to a vec. Read more
Source§

fn write_all_sync<W: Write + BufWrite>(self, writer: W) -> Result<()>

Available on crate feature std only.
Writes all encoded bytes to the std writer.
Source§

fn write_all_sync_lgio<W: BufWrite>( self, writer: W, ) -> Result<(), W::WriteError>

Available on crate feature lgio only.
Writes all encoded bytes to the std writer.
Source§

fn write_all_tokio<W: AsyncWrite + BufWrite>( self, writer: W, ) -> TokioEncodeFuture<W, Self>

Available on crate feature tokio only.
Writes all encoded bytes to the tokio async writer. Read more
Source§

fn write_all_async_std<W: Write + BufWrite>( self, writer: W, ) -> AsyncStdEncodeFuture<W, Self>

Available on crate feature async-std only.
Writes all encoded bytes to the async-std async writer. Read more
Source§

fn write_all_futures_0_3<W: AsyncWrite + BufWrite>( self, writer: W, ) -> Futures0Dot3EncodeFuture<W, Self>

Available on crate feature futures_0_3 only.
Writes all encoded bytes to the futures 0.3 async writer. Read more
Source§

fn then<E: Encoder, F: FnMut() -> E>( self, second_encoder_constructor: F, ) -> Then<Self, E, F>

Chains an encoder constructed by second_encoder_constructor after this one. Read more
Source§

fn chain<T: Encoder>(self, second_encoder: T) -> Chain<Self, T>

Chains another encoder after this one. Read more

Auto Trait Implementations§

§

impl<A, B, F> Freeze for Then<A, B, F>
where A: Freeze, F: Freeze, B: Freeze,

§

impl<A, B, F> RefUnwindSafe for Then<A, B, F>

§

impl<A, B, F> Send for Then<A, B, F>
where A: Send, F: Send, B: Send,

§

impl<A, B, F> Sync for Then<A, B, F>
where A: Sync, F: Sync, B: Sync,

§

impl<A, B, F> Unpin for Then<A, B, F>
where A: Unpin, F: Unpin, B: Unpin,

§

impl<A, B, F> UnwindSafe for Then<A, B, F>
where A: UnwindSafe, F: UnwindSafe, B: UnwindSafe,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.