pub trait ReadableOptionVec<I: VecIndex, T: VecValue + Default> {
// Required methods
fn collect_or_default(&self) -> Vec<T>;
fn collect_one_flat(&self, index: I) -> Option<T>;
}Expand description
Extension methods for ReadableVec<I, Option<T>>.
Required Methods§
Sourcefn collect_or_default(&self) -> Vec<T>
fn collect_or_default(&self) -> Vec<T>
Collect all values, replacing None with T::default().
Sourcefn collect_one_flat(&self, index: I) -> Option<T>
fn collect_one_flat(&self, index: I) -> Option<T>
Flattens Option<Option<T>> → Option<T>.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".