sop

Trait Save

Source
pub trait Save {
    // Required method
    fn to_writer(
        &self,
        armored: bool,
        sink: &mut (dyn Write + Send + Sync),
    ) -> Result<()>;

    // Provided methods
    fn to_stdout(&self, armored: bool) -> Result<()> { ... }
    fn to_vec(&self, armored: bool) -> Result<Vec<u8>> { ... }
}
Expand description

Saves objects like certs and keys.

Required Methods§

Source

fn to_writer( &self, armored: bool, sink: &mut (dyn Write + Send + Sync), ) -> Result<()>

Saves objects like certs and keys, writing them to the given writer.

Provided Methods§

Source

fn to_stdout(&self, armored: bool) -> Result<()>

Writes objects like certs and keys to stdout.

Source

fn to_vec(&self, armored: bool) -> Result<Vec<u8>>

Saves objects like certs and keys, writing them to a vector.

Implementors§