NestedReader

Struct NestedReader 

Source
pub struct NestedReader<'r, R: Reader> { /* private fields */ }
Expand description

Reader type used by Reader::read_prefixed.

Trait Implementations§

Source§

impl<'r, R: Reader> Reader for NestedReader<'r, R>

Source§

fn read<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>

Read as much data as is needed to exactly fill out. Read more
Source§

fn remaining_len(&self) -> usize

Get the length of the remaining data after Base64 decoding.
Source§

fn is_finished(&self) -> bool

Is decoding finished?
Source§

fn read_prefixed<'r, T, E, F>(&'r mut self, f: F) -> Result<T, E>
where E: From<Error>, F: FnOnce(&mut NestedReader<'r, Self>) -> Result<T, E>,

Decode length-prefixed data. Read more
Source§

fn read_byten<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>

Decodes [u8] from byte[n] as described in RFC4251 § 5: Read more
Source§

fn read_string<'o>(&mut self, buf: &'o mut [u8]) -> Result<&'o str>

Decode a string as described in RFC4251 § 5: Read more
Source§

fn drain(&mut self, n_bytes: usize) -> Result<()>

Drain the given number of bytes from the reader, discarding them.
Source§

fn drain_prefixed(&mut self) -> Result<usize>

Decode a u32 length prefix, and then drain the length of the body. Read more
Source§

fn finish<T>(self, value: T) -> Result<T>

Finish decoding, returning the given value if there is no remaining data, or an error otherwise.

Auto Trait Implementations§

§

impl<'r, R> Freeze for NestedReader<'r, R>

§

impl<'r, R> RefUnwindSafe for NestedReader<'r, R>
where R: RefUnwindSafe,

§

impl<'r, R> Send for NestedReader<'r, R>
where R: Send,

§

impl<'r, R> Sync for NestedReader<'r, R>
where R: Sync,

§

impl<'r, R> Unpin for NestedReader<'r, R>

§

impl<'r, R> !UnwindSafe for NestedReader<'r, R>

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

Source§

type Output = T

Should always be Self
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.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes