Struct glsl::syntax::NonEmpty [−][src]
pub struct NonEmpty<T>(pub Vec<T>);
A non-empty Vec
. It has at least one element.
Implementations
impl<T> NonEmpty<T>
[src]
impl<T> NonEmpty<T>
[src]pub fn from_non_empty_iter<I>(iter: I) -> Option<Self> where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
pub fn push(&mut self, item: T)
[src]
Move a new item at the end of the non-empty.
pub fn pop(&mut self) -> Option<T>
[src]
Move out the last element of the non-empty.
Errors
This function returns None
if called on a non-empty that contains a single element.
Trait Implementations
impl<T> Extend<T> for NonEmpty<T>
[src]
impl<T> Extend<T> for NonEmpty<T>
[src]fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
pub fn extend_one(&mut self, item: A)
[src]
pub fn extend_reserve(&mut self, additional: usize)
[src]
impl<T> IntoIterator for NonEmpty<T>
[src]
impl<T> IntoIterator for NonEmpty<T>
[src]impl<'a, T> IntoIterator for &'a NonEmpty<T>
[src]
impl<'a, T> IntoIterator for &'a NonEmpty<T>
[src]impl<'a, T> IntoIterator for &'a mut NonEmpty<T>
[src]
impl<'a, T> IntoIterator for &'a mut NonEmpty<T>
[src]impl<T> StructuralPartialEq for NonEmpty<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for NonEmpty<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for NonEmpty<T> where
T: Send,
T: Send,
impl<T> Sync for NonEmpty<T> where
T: Sync,
T: Sync,
impl<T> Unpin for NonEmpty<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NonEmpty<T> where
T: UnwindSafe,
T: UnwindSafe,