[−][src]Struct opentimestamps::ser::Deserializer
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,
R: Unpin,
impl<R> Sync for Deserializer<R> where
R: Sync,
R: Sync,
impl<R> Send for Deserializer<R> where
R: Send,
R: Send,
impl<R> UnwindSafe for Deserializer<R> where
R: UnwindSafe,
R: UnwindSafe,
impl<R> RefUnwindSafe for Deserializer<R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,