gimli::read::lookup

Trait LookupParser

Source
pub trait LookupParser<R: Reader> {
    type Header;
    type Entry;

    // Required methods
    fn parse_header(input: &mut R) -> Result<(R, Self::Header)>;
    fn parse_entry(
        input: &mut R,
        header: &Self::Header,
    ) -> Result<Option<Self::Entry>>;
}

Required Associated Types§

Source

type Header

The type of the produced header.

Source

type Entry

The type of the produced entry.

Required Methods§

Source

fn parse_header(input: &mut R) -> Result<(R, Self::Header)>

Parse a header from input. Returns a tuple of input sliced to contain just the entries corresponding to this header (without the header itself), and the parsed representation of the header itself.

Source

fn parse_entry( input: &mut R, header: &Self::Header, ) -> Result<Option<Self::Entry>>

Parse a single entry from input. Returns either a parsed representation of the entry or None if input is exhausted.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<R, Entry> LookupParser<R> for PubStuffParser<R, Entry>
where R: Reader, Entry: PubStuffEntry<R>,