[][src]Trait sequoia_openpgp::serialize::SerializeKey

pub trait SerializeKey {
    fn serialize<W: Write>(&self, o: &mut W, tag: Tag) -> Result<()>;

    fn to_vec(&self, tag: Tag) -> Result<Vec<u8>> { ... }
}

Key packet serialization.

This interface serializes key packets.

Required methods

fn serialize<W: Write>(&self, o: &mut W, tag: Tag) -> Result<()>

Writes a serialized version of the key packet to o.

Tag identifies the kind of packet to write.

Loading content...

Provided methods

fn to_vec(&self, tag: Tag) -> Result<Vec<u8>>

Serializes the packet to a vector.

Loading content...

Implementors

impl SerializeKey for Key[src]

fn serialize<W: Write>(&self, o: &mut W, tag: Tag) -> Result<()>[src]

Writes a serialized version of the specified Key packet to o.

Errors

Returns Error::InvalidArgument if invoked on a non-version 4 key.

fn to_vec(&self, tag: Tag) -> Result<Vec<u8>>[src]

Loading content...