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§

source

fn from_packets<'a, I>( packets: Peekable<I> ) -> Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>where I: Iterator<Item = Packet> + 'a,

Turn a list of packets into a usable representation.

Provided Methods§

source

fn from_bytes(bytes: impl Read) -> Result<Self, Error>

Parse a single byte encoded composition.

source

fn from_string( input: &str ) -> Result<(Self, BTreeMap<String, String, Global>), Error>

Parse a single armor encoded composition.

source

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.

source

fn from_armor_single<R>( input: R ) -> Result<(Self, BTreeMap<String, String, Global>), Error>where R: Read + Seek,

Armored ascii data.

source

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,

Armored ascii data.

source

fn from_bytes_many<'a>( bytes: impl Read + 'a ) -> Box<dyn Iterator<Item = Result<Self, Error>> + 'a, Global>

Parse a list of compositions in raw byte format.

Implementors§