Trait npyz::TypeRead [−][src]
pub trait TypeRead { type Value; fn read_one<R: Read>(&self, bytes: R) -> Result<Self::Value>
where
Self: Sized; }
Expand description
Like some sort of for<R: io::Read> Fn(R) -> io::Result<T>
.
For an example of how to implement this manually, see Vector5
in the
roundtrip test.
Trait objects
dyn TypeRead
has no object-safe methods.
If you need dynamic polymorphism, use dyn
TypeReadDyn
instead.