Trait Writer

Source
pub trait Writer {
    // Required method
    fn write(&mut self, slice: &[u8]) -> Result<(), Error>;

    // Provided method
    fn write_byte(&mut self, byte: u8) -> Result<(), Error> { ... }
}
Available on crate feature pkcs8 only.
Expand description

Writer trait which outputs encoded DER.

Required Methods§

Source

fn write(&mut self, slice: &[u8]) -> Result<(), Error>

Write the given DER-encoded bytes as output.

Provided Methods§

Source

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

Write a single byte.

Implementors§

Source§

impl Writer for PemWriter<'_>

Source§

impl<'a> Writer for SliceWriter<'a>

Source§

impl<W> Writer for W
where W: Write,

Available on crate feature std only.