[][src]Struct opentimestamps::ser::Serializer

pub struct Serializer<W: Write> { /* fields omitted */ }

Standard serializer for OTS info files

Methods

impl<W: Write> Serializer<W>[src]

pub fn new(writer: W) -> Serializer<W>[src]

Constructs a new deserializer from a reader

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

Extracts the underlying writer from the serializer

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

Writes the magic bytes

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

Writes the major version

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

Writes a single byte to the writer

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

Write an unsigned integer

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

Write a fixed number of bytes

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

Write a variable number of bytes

Auto Trait Implementations

impl<W> Unpin for Serializer<W> where
    W: Unpin

impl<W> Sync for Serializer<W> where
    W: Sync

impl<W> Send for Serializer<W> where
    W: Send

impl<W> UnwindSafe for Serializer<W> where
    W: UnwindSafe

impl<W> RefUnwindSafe for Serializer<W> where
    W: 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]