pub trait LoadAttribute: Sized + Debug {
    type Output;

Show 16 methods fn expecting(&self) -> String; fn load_bool(self, _: bool) -> Result<Self::Output> { ... } fn load_i16(self, _: i16) -> Result<Self::Output> { ... } fn load_i32(self, _: i32) -> Result<Self::Output> { ... } fn load_i64(self, _: i64) -> Result<Self::Output> { ... } fn load_f32(self, _: f32) -> Result<Self::Output> { ... } fn load_f64(self, _: f64) -> Result<Self::Output> { ... } fn load_seq_bool(
        self,
        _: impl Iterator<Item = Result<bool>>,
        _len: usize
    ) -> Result<Self::Output> { ... } fn load_seq_i32(
        self,
        _: impl Iterator<Item = Result<i32>>,
        _len: usize
    ) -> Result<Self::Output> { ... } fn load_seq_i64(
        self,
        _: impl Iterator<Item = Result<i64>>,
        _len: usize
    ) -> Result<Self::Output> { ... } fn load_seq_f32(
        self,
        _: impl Iterator<Item = Result<f32>>,
        _len: usize
    ) -> Result<Self::Output> { ... } fn load_seq_f64(
        self,
        _: impl Iterator<Item = Result<f64>>,
        _len: usize
    ) -> Result<Self::Output> { ... } fn load_binary(self, _: impl Read, _len: u64) -> Result<Self::Output> { ... } fn load_binary_buffered(
        self,
        reader: impl BufRead,
        len: u64
    ) -> Result<Self::Output> { ... } fn load_string(self, _: impl Read, _len: u64) -> Result<Self::Output> { ... } fn load_string_buffered(
        self,
        reader: impl BufRead,
        len: u64
    ) -> Result<Self::Output> { ... }
}
Expand description

A trait for attribute loader types.

This is a lot like a “visitor”, but node attributes do not have recursive structures, so this loader is not “visitor”.

The load_* method corresponding to the node attribute type are called with its value.

All of load_* has default implementation to return error as “unexpected attribute”. Users should implement them manually for types they want to interpret.

For simple types, pull_parser::v7400::attribute::loaders module contains useful loaders.

Required Associated Types

Result type on successful read.

Required Methods

Describes the expecting value.

Provided Methods

Loads boolean value.

Loads i16 value.

Loads i32 value.

Loads i64 value.

Loads f32 value.

Loads f64 value.

Loads boolean array.

Loads i32 array.

Loads i64 array.

Loads f32 array.

Loads f64 array.

Loads binary value.

This method should return error when the given reader returned error.

Loads binary value on buffered reader.

This method should return error when the given reader returned error.

Loads string value.

This method should return error when the given reader returned error.

Loads string value on buffered reader.

This method should return error when the given reader returned error.

Implementors