Type Definition ssh_encoding::Base64Reader
source · [−]Available on crate feature
base64
only.Expand description
Constant-time Base64 reader implementation.
Trait Implementations
sourceimpl Reader for Base64Reader<'_>
impl Reader for Base64Reader<'_>
sourcefn read<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
fn read<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
Read as much data as is needed to exactly fill
out
. Read moresourcefn remaining_len(&self) -> usize
fn remaining_len(&self) -> usize
Get the length of the remaining data after Base64 decoding.
sourcefn is_finished(&self) -> bool
fn is_finished(&self) -> bool
Is decoding finished?
sourcefn 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>,
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
sourcefn read_byten<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
fn read_byten<'o>(&mut self, out: &'o mut [u8]) -> Result<&'o [u8]>
sourcefn read_string<'o>(&mut self, buf: &'o mut [u8]) -> Result<&'o str>
fn read_string<'o>(&mut self, buf: &'o mut [u8]) -> Result<&'o str>
sourcefn drain(&mut self, n_bytes: usize) -> Result<()>
fn drain(&mut self, n_bytes: usize) -> Result<()>
Drain the given number of bytes from the reader, discarding them.
sourcefn drain_prefixed(&mut self) -> Result<usize>
fn drain_prefixed(&mut self) -> Result<usize>
Decode a
u32
length prefix, and then drain the length of the body. Read more