Skip to main content

oxilean_std/option/
optionvec_traits.rs

1//! # OptionVec - Trait Implementations
2//!
3//! This module contains trait implementations for `OptionVec`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//! - `FromIterator`
9//!
10//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
11
12use super::types::OptionVec;
13
14impl<T> Default for OptionVec<T> {
15    fn default() -> Self {
16        Self::new()
17    }
18}
19
20impl<T> FromIterator<Option<T>> for OptionVec<T> {
21    fn from_iter<I: IntoIterator<Item = Option<T>>>(iter: I) -> Self {
22        Self {
23            items: iter.into_iter().collect(),
24        }
25    }
26}