Struct opentimestamps::ser::Serializer
[−]
[src]
pub struct Serializer<W: Write> { /* fields omitted */ }
Standard serializer for OTS info files
Methods
impl<W: Write> Serializer<W>
[src]
fn new(writer: W) -> Serializer<W>
Constructs a new deserializer from a reader
fn into_inner(self) -> W
Extracts the underlying writer from the serializer
fn write_magic(&mut self) -> Result<(), Error>
Writes the magic bytes
fn write_version(&mut self) -> Result<(), Error>
Writes the major version
fn write_byte(&mut self, byte: u8) -> Result<(), Error>
Writes a single byte to the writer
fn write_uint(&mut self, n: usize) -> Result<(), Error>
Write an unsigned integer
fn write_fixed_bytes(&mut self, data: &[u8]) -> Result<(), Error>
Write a fixed number of bytes
fn write_bytes(&mut self, data: &[u8]) -> Result<(), Error>
Write a variable number of bytes