Trait dae_parser::source::SourceRead[][src]

pub trait SourceRead<K: InputKind + ?Sized>: Sized {
    type Output: Clone;
    fn load(&self, data: &[<K::Array as ArrayKind>::Elem]) -> Self::Output;
}
Expand description

A trait for Source readers, which are used via the SourceReader type returned from Source::reader. Users can implement this trait on their own type to customize reading, or use [Source::new_xyz] and [Source::new_st] for the common cases.

Associated Types

The output value. This must be Clone because outputs are reused in some mesh kinds, like TriStrips.

Required methods

Given the array data for a single vertex, extract the values into Output. The length of data will be the stride of the accessor.

Readers should be stateless, because the output of a load call may be cached and reused instead of calling load again.

Implementors