Trait pgp::native::Deserializable
source · pub trait Deserializable: Sized {
// Required method
fn from_packets<'a, I>(
packets: Peekable<I>
) -> Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>
where I: Iterator<Item = Packet> + 'a;
// Provided methods
fn from_bytes(bytes: impl Read) -> Result<Self, Error> { ... }
fn from_string(
input: &str
) -> Result<(Self, BTreeMap<String, String, Global>), Error> { ... }
fn from_string_many<'a>(
input: &'a str
) -> Result<(Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>, BTreeMap<String, String, Global>), Error> { ... }
fn from_armor_single<R>(
input: R
) -> Result<(Self, BTreeMap<String, String, Global>), Error>
where R: Read + Seek { ... }
fn from_armor_many<'a, R>(
input: R
) -> Result<(Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>, BTreeMap<String, String, Global>), Error>
where R: Read + Seek + 'a { ... }
fn from_bytes_many<'a>(
bytes: impl Read + 'a
) -> Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global> { ... }
}
Required Methods§
Provided Methods§
sourcefn from_bytes(bytes: impl Read) -> Result<Self, Error>
fn from_bytes(bytes: impl Read) -> Result<Self, Error>
Parse a single byte encoded composition.
sourcefn from_string(
input: &str
) -> Result<(Self, BTreeMap<String, String, Global>), Error>
fn from_string( input: &str ) -> Result<(Self, BTreeMap<String, String, Global>), Error>
Parse a single armor encoded composition.
sourcefn from_string_many<'a>(
input: &'a str
) -> Result<(Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>, BTreeMap<String, String, Global>), Error>
fn from_string_many<'a>( input: &'a str ) -> Result<(Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>, BTreeMap<String, String, Global>), Error>
Parse an armor encoded list of compositions.
sourcefn from_armor_single<R>(
input: R
) -> Result<(Self, BTreeMap<String, String, Global>), Error>where
R: Read + Seek,
fn from_armor_single<R>( input: R ) -> Result<(Self, BTreeMap<String, String, Global>), Error>where R: Read + Seek,
Armored ascii data.