[][src]Trait persia_speedy::Reader

pub trait Reader<'a, C: Context>: Sized {
    pub fn read_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>;
pub fn peek_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>;
pub fn context(&self) -> &C;
pub fn context_mut(&mut self) -> &mut C; pub fn skip_bytes(&mut self, mut length: usize) -> Result<(), C::Error> { ... }
pub fn can_read_at_least(&self, _size: usize) -> Option<bool> { ... }
pub fn read_bytes_borrowed(
        &mut self,
        _length: usize
    ) -> Option<Result<&'a [u8], C::Error>> { ... }
pub fn read_u8(&mut self) -> Result<u8, C::Error> { ... }
pub fn peek_u8(&mut self) -> Result<u8, C::Error> { ... }
pub fn read_i8(&mut self) -> Result<i8, C::Error> { ... }
pub fn peek_i8(&mut self) -> Result<i8, C::Error> { ... }
pub fn read_u16(&mut self) -> Result<u16, C::Error> { ... }
pub fn read_f16(&mut self) -> Result<f16, C::Error> { ... }
pub fn peek_u16(&mut self) -> Result<u16, C::Error> { ... }
pub fn peek_f16(&mut self) -> Result<f16, C::Error> { ... }
pub fn read_i16(&mut self) -> Result<i16, C::Error> { ... }
pub fn peek_i16(&mut self) -> Result<i16, C::Error> { ... }
pub fn read_u32(&mut self) -> Result<u32, C::Error> { ... }
pub fn peek_u32(&mut self) -> Result<u32, C::Error> { ... }
pub fn read_i32(&mut self) -> Result<i32, C::Error> { ... }
pub fn peek_i32(&mut self) -> Result<i32, C::Error> { ... }
pub fn read_u64(&mut self) -> Result<u64, C::Error> { ... }
pub fn read_u128(&mut self) -> Result<u128, C::Error> { ... }
pub fn peek_u64(&mut self) -> Result<u64, C::Error> { ... }
pub fn read_i64(&mut self) -> Result<i64, C::Error> { ... }
pub fn peek_i64(&mut self) -> Result<i64, C::Error> { ... }
pub fn read_f32(&mut self) -> Result<f32, C::Error> { ... }
pub fn peek_f32(&mut self) -> Result<f32, C::Error> { ... }
pub fn read_f64(&mut self) -> Result<f64, C::Error> { ... }
pub fn peek_f64(&mut self) -> Result<f64, C::Error> { ... }
pub fn read_value<T: Readable<'a, C>>(&mut self) -> Result<T, C::Error> { ... }
pub fn endianness(&self) -> Endianness { ... }
pub fn read_vec<T>(&mut self, length: usize) -> Result<Vec<T>, C::Error>
    where
        T: Readable<'a, C>
, { ... }
pub fn read_cow<T>(
        &mut self,
        length: usize
    ) -> Result<Cow<'a, [T]>, C::Error>
    where
        T: Readable<'a, C>,
        [T]: ToOwned<Owned = Vec<T>>
, { ... }
pub fn read_string(&mut self, length: usize) -> Result<String, C::Error> { ... }
pub fn read_collection<T, U>(
        &mut self,
        length: usize
    ) -> Result<U, C::Error>
    where
        U: FromIterator<T>,
        T: Readable<'a, C>
, { ... }
pub fn read_u64_varint(&mut self) -> Result<u64, C::Error> { ... }
pub fn peek_u64_varint(&mut self) -> Result<u64, C::Error> { ... } }

Required methods

pub fn read_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>[src]

pub fn peek_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>[src]

pub fn context(&self) -> &C[src]

pub fn context_mut(&mut self) -> &mut C[src]

Loading content...

Provided methods

pub fn skip_bytes(&mut self, mut length: usize) -> Result<(), C::Error>[src]

pub fn can_read_at_least(&self, _size: usize) -> Option<bool>[src]

pub fn read_bytes_borrowed(
    &mut self,
    _length: usize
) -> Option<Result<&'a [u8], C::Error>>
[src]

pub fn read_u8(&mut self) -> Result<u8, C::Error>[src]

pub fn peek_u8(&mut self) -> Result<u8, C::Error>[src]

pub fn read_i8(&mut self) -> Result<i8, C::Error>[src]

pub fn peek_i8(&mut self) -> Result<i8, C::Error>[src]

pub fn read_u16(&mut self) -> Result<u16, C::Error>[src]

pub fn read_f16(&mut self) -> Result<f16, C::Error>[src]

pub fn peek_u16(&mut self) -> Result<u16, C::Error>[src]

pub fn peek_f16(&mut self) -> Result<f16, C::Error>[src]

pub fn read_i16(&mut self) -> Result<i16, C::Error>[src]

pub fn peek_i16(&mut self) -> Result<i16, C::Error>[src]

pub fn read_u32(&mut self) -> Result<u32, C::Error>[src]

pub fn peek_u32(&mut self) -> Result<u32, C::Error>[src]

pub fn read_i32(&mut self) -> Result<i32, C::Error>[src]

pub fn peek_i32(&mut self) -> Result<i32, C::Error>[src]

pub fn read_u64(&mut self) -> Result<u64, C::Error>[src]

pub fn read_u128(&mut self) -> Result<u128, C::Error>[src]

pub fn peek_u64(&mut self) -> Result<u64, C::Error>[src]

pub fn read_i64(&mut self) -> Result<i64, C::Error>[src]

pub fn peek_i64(&mut self) -> Result<i64, C::Error>[src]

pub fn read_f32(&mut self) -> Result<f32, C::Error>[src]

pub fn peek_f32(&mut self) -> Result<f32, C::Error>[src]

pub fn read_f64(&mut self) -> Result<f64, C::Error>[src]

pub fn peek_f64(&mut self) -> Result<f64, C::Error>[src]

pub fn read_value<T: Readable<'a, C>>(&mut self) -> Result<T, C::Error>[src]

pub fn endianness(&self) -> Endianness[src]

pub fn read_vec<T>(&mut self, length: usize) -> Result<Vec<T>, C::Error> where
    T: Readable<'a, C>, 
[src]

pub fn read_cow<T>(&mut self, length: usize) -> Result<Cow<'a, [T]>, C::Error> where
    T: Readable<'a, C>,
    [T]: ToOwned<Owned = Vec<T>>, 
[src]

pub fn read_string(&mut self, length: usize) -> Result<String, C::Error>[src]

pub fn read_collection<T, U>(&mut self, length: usize) -> Result<U, C::Error> where
    U: FromIterator<T>,
    T: Readable<'a, C>, 
[src]

pub fn read_u64_varint(&mut self) -> Result<u64, C::Error>[src]

pub fn peek_u64_varint(&mut self) -> Result<u64, C::Error>[src]

Loading content...

Implementors

Loading content...