[][src]Struct opentimestamps::ser::Deserializer

pub struct Deserializer<R: Read> { /* fields omitted */ }

Standard deserializer for OTS info files

Methods

impl<R: Read> Deserializer<R>[src]

pub fn new(reader: R) -> Deserializer<R>[src]

Constructs a new deserializer from a reader

pub fn into_inner(self) -> R[src]

Extracts the underlying reader from the deserializer

pub fn read_magic(&mut self) -> Result<(), Error>[src]

Reads the magic bytes and checks that they are what we expect

pub fn read_version(&mut self) -> Result<(), Error>[src]

Reads the version and checks that it is what we expect

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

Reads a single byte from the reader

pub fn read_uint(&mut self) -> Result<usize, Error>[src]

Deserializes an unsigned integer

pub fn read_fixed_bytes(&mut self, n: usize) -> Result<Vec<u8>, Error>[src]

Deserializes a fixed number of bytes

pub fn read_bytes(&mut self, min: usize, max: usize) -> Result<Vec<u8>, Error>[src]

Deserializes a variable number of bytes

pub fn check_eof(&mut self) -> Result<(), Error>[src]

Check that there is no trailing data

Auto Trait Implementations

impl<R> Unpin for Deserializer<R> where
    R: Unpin

impl<R> Sync for Deserializer<R> where
    R: Sync

impl<R> Send for Deserializer<R> where
    R: Send

impl<R> UnwindSafe for Deserializer<R> where
    R: UnwindSafe

impl<R> RefUnwindSafe for Deserializer<R> where
    R: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]