Trait speedy::Reader

source ·
pub trait Reader<'a, C: Context>: Sized {
Show 47 methods fn read_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>; fn peek_bytes(&mut self, output: &mut [u8]) -> Result<(), C::Error>; fn context(&self) -> &C; fn context_mut(&mut self) -> &mut C; unsafe fn read_bytes_into_ptr(
        &mut self,
        output: *mut u8,
        length: usize
    ) -> Result<(), C::Error> { ... } unsafe fn peek_bytes_into_ptr(
        &mut self,
        output: *mut u8,
        length: usize
    ) -> Result<(), C::Error> { ... } fn skip_bytes(&mut self, length: usize) -> Result<(), C::Error> { ... } fn can_read_at_least(&self, _size: usize) -> Option<bool> { ... } fn read_bytes_borrowed(
        &mut self,
        _length: usize
    ) -> Option<Result<&'a [u8], C::Error>> { ... } fn read_bytes_borrowed_from_reader<'r>(
        &'r mut self,
        _length: usize
    ) -> Option<Result<&'r [u8], C::Error>> { ... } fn read_bytes_borrowed_until_eof(&mut self) -> Option<&'a [u8]> { ... } fn read_u8(&mut self) -> Result<u8, C::Error> { ... } fn peek_u8(&mut self) -> Result<u8, C::Error> { ... } fn read_i8(&mut self) -> Result<i8, C::Error> { ... } fn peek_i8(&mut self) -> Result<i8, C::Error> { ... } fn read_u16(&mut self) -> Result<u16, C::Error> { ... } fn peek_u16(&mut self) -> Result<u16, C::Error> { ... } fn read_i16(&mut self) -> Result<i16, C::Error> { ... } fn peek_i16(&mut self) -> Result<i16, C::Error> { ... } fn read_u32(&mut self) -> Result<u32, C::Error> { ... } fn peek_u32(&mut self) -> Result<u32, C::Error> { ... } fn read_i32(&mut self) -> Result<i32, C::Error> { ... } fn peek_i32(&mut self) -> Result<i32, C::Error> { ... } fn read_u64(&mut self) -> Result<u64, C::Error> { ... } fn peek_u64(&mut self) -> Result<u64, C::Error> { ... } fn read_i64(&mut self) -> Result<i64, C::Error> { ... } fn peek_i64(&mut self) -> Result<i64, C::Error> { ... } fn read_u128(&mut self) -> Result<u128, C::Error> { ... } fn peek_u128(&mut self) -> Result<u128, C::Error> { ... } fn read_i128(&mut self) -> Result<i128, C::Error> { ... } fn peek_i128(&mut self) -> Result<i128, C::Error> { ... } fn read_f32(&mut self) -> Result<f32, C::Error> { ... } fn peek_f32(&mut self) -> Result<f32, C::Error> { ... } fn read_f64(&mut self) -> Result<f64, C::Error> { ... } fn peek_f64(&mut self) -> Result<f64, C::Error> { ... } fn read_value<T: Readable<'a, C>>(&mut self) -> Result<T, C::Error> { ... } fn endianness(&self) -> Endianness { ... } fn read_vec<T>(&mut self, length: usize) -> Result<Vec<T>, C::Error>
    where
        T: Readable<'a, C>
, { ... } fn read_vec_until_eof<T>(&mut self) -> Result<Vec<T>, C::Error>
    where
        T: Readable<'a, C>
, { ... } fn read_cow<T>(&mut self, length: usize) -> Result<Cow<'a, [T]>, C::Error>
    where
        T: Readable<'a, C>,
        [T]: ToOwned<Owned = Vec<T>>
, { ... } fn read_cow_until_eof<T>(&mut self) -> Result<Cow<'a, [T]>, C::Error>
    where
        T: Readable<'a, C>,
        [T]: ToOwned<Owned = Vec<T>>
, { ... } fn read_string(&mut self, length: usize) -> Result<String, C::Error> { ... } fn read_collection<T, U>(&mut self, length: usize) -> Result<U, C::Error>
    where
        U: FromIterator<T>,
        T: Readable<'a, C>
, { ... } fn read_key_value_collection<K, V, U>(
        &mut self,
        length: usize
    ) -> Result<U, C::Error>
    where
        U: FromIterator<(K, V)>,
        K: Readable<'a, C>,
        V: Readable<'a, C>
, { ... } fn read_collection_until_eof<T, U>(&mut self) -> Result<U, C::Error>
    where
        U: FromIterator<T>,
        T: Readable<'a, C>
, { ... } fn read_u64_varint(&mut self) -> Result<u64, C::Error> { ... } fn peek_u64_varint(&mut self) -> Result<u64, C::Error> { ... }
}

Required Methods

Provided Methods

Implementors