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§

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

Write the given DER-encoded bytes as output.

Provided Methods§

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

Write a single byte.

Implementors§

§

impl Writer for PemWriter<'_>

§

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

§

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

Available on crate feature std only.