objects

Trait Parser

Source
pub trait Parser: Sized {
    type Error;

    // Required method
    fn parse<R: Read>(buf: R) -> Result<Self, Self::Error>;
}
Expand description

An parser type can parse objects from raw bytes of encoded data.

Required Associated Types§

Required Methods§

Source

fn parse<R: Read>(buf: R) -> Result<Self, Self::Error>

Parses from raw bytes of a specific Document Type into specific object, or returns an error.

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§