pub trait Unflatten<D, T>: FlatLen + Sized {
// Required method
fn unflatten<I>(data: &D, source: &mut I) -> Option<Self>
where I: Iterator<Item = T>;
}
Expand description
Unflatten a structure from an iterator.
Required Methods§
Sourcefn unflatten<I>(data: &D, source: &mut I) -> Option<Self>where
I: Iterator<Item = T>,
fn unflatten<I>(data: &D, source: &mut I) -> Option<Self>where
I: Iterator<Item = T>,
Unflatten a structure from an iterator.
A correct implementation must only return None
if the iterator has insufficient elements.
Returning None for any other reason is a logic error.
Unsafe code should not rely on implementations of this method being correct.
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.