Trait fbxcel::pull_parser::v7400::LoadAttribute
source · [−]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
Required Methods
Provided Methods
sourcefn load_seq_bool(
self,
_: impl Iterator<Item = Result<bool>>,
_len: usize
) -> Result<Self::Output>
fn load_seq_bool(
self,
_: impl Iterator<Item = Result<bool>>,
_len: usize
) -> Result<Self::Output>
Loads boolean array.
sourcefn load_seq_i32(
self,
_: impl Iterator<Item = Result<i32>>,
_len: usize
) -> Result<Self::Output>
fn load_seq_i32(
self,
_: impl Iterator<Item = Result<i32>>,
_len: usize
) -> Result<Self::Output>
Loads i32
array.
sourcefn load_seq_i64(
self,
_: impl Iterator<Item = Result<i64>>,
_len: usize
) -> Result<Self::Output>
fn load_seq_i64(
self,
_: impl Iterator<Item = Result<i64>>,
_len: usize
) -> Result<Self::Output>
Loads i64
array.
sourcefn load_seq_f32(
self,
_: impl Iterator<Item = Result<f32>>,
_len: usize
) -> Result<Self::Output>
fn load_seq_f32(
self,
_: impl Iterator<Item = Result<f32>>,
_len: usize
) -> Result<Self::Output>
Loads f32
array.
sourcefn load_seq_f64(
self,
_: impl Iterator<Item = Result<f64>>,
_len: usize
) -> Result<Self::Output>
fn load_seq_f64(
self,
_: impl Iterator<Item = Result<f64>>,
_len: usize
) -> Result<Self::Output>
Loads f64
array.
sourcefn load_binary(self, _: impl Read, _len: u64) -> Result<Self::Output>
fn load_binary(self, _: impl Read, _len: u64) -> Result<Self::Output>
Loads binary value.
This method should return error when the given reader returned error.
sourcefn load_binary_buffered(
self,
reader: impl BufRead,
len: u64
) -> Result<Self::Output>
fn load_binary_buffered(
self,
reader: impl BufRead,
len: u64
) -> Result<Self::Output>
Loads binary value on buffered reader.
This method should return error when the given reader returned error.