Skip to main content

Base64Reader

Struct Base64Reader 

Source
pub struct Base64Reader<'i> { /* private fields */ }
Available on crate feature base64 only.
Expand description

Constant-time Base64 reader implementation.

Implementations§

Source§

impl<'i> Base64Reader<'i>

Source

pub fn new(input: &'i [u8]) -> Result<Self>

Create a new Base64 reader for a byte slice containing contiguous (non-newline-delimited) Base64-encoded data.

§Errors

Returns crate::Error::Base64 if the input buffer is empty.

Trait Implementations§

Source§

impl Debug for Base64Reader<'_>

Source§

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

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

impl Reader for Base64Reader<'_>

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 decoded data.
Source§

fn into_decoder(self) -> Result<Decoder<Self>>

Consume this reader, wrapping it in a decoder for SSH protocol data types. Read more

Auto Trait Implementations§

§

impl<'i> Forget for Base64Reader<'i>

§

impl<'i> Freeze for Base64Reader<'i>

§

impl<'i> Move for Base64Reader<'i>

§

impl<'i> RefUnwindSafe for Base64Reader<'i>

§

impl<'i> Send for Base64Reader<'i>

§

impl<'i> Sync for Base64Reader<'i>

§

impl<'i> Unpin for Base64Reader<'i>

§

impl<'i> UnsafeUnpin for Base64Reader<'i>

§

impl<'i> UnwindSafe for Base64Reader<'i>

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.