Skip to main content

Writer

Trait Writer 

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

    // Provided method
    fn write_byte(&mut self, byte: u8) -> Result<()> { ... }
}
Expand description

Writer trait which outputs encoded DER.

Required Methods§

Source

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

Write the given DER-encoded bytes as output.

§Errors

If the write operation failed.

Provided Methods§

Source

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

Write a single byte.

§Errors

If the write operation failed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Writer for PemWriter<'_>

Source§

impl Writer for SliceWriter<'_>

Source§

impl<W: Write> Writer for W

Available on crate feature std only.