[−][src]Struct glsl::syntax::NonEmpty
A non-empty Vec
. It has at least one element.
Methods
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]
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = T>,
[src]
I: IntoIterator<Item = T>,
impl<T> IntoIterator for NonEmpty<T>
[src]
type IntoIter = <Vec<T> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
type Item = T
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T> IntoIterator for &'a NonEmpty<T>
[src]
type IntoIter = <&'a Vec<T> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
type Item = &'a T
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T> IntoIterator for &'a mut NonEmpty<T>
[src]
type IntoIter = <&'a mut Vec<T> as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
type Item = &'a mut T
The type of the elements being iterated over.
fn into_iter(self) -> Self::IntoIter
[src]
impl<T: Clone> Clone for NonEmpty<T>
[src]
impl<T: PartialEq> PartialEq<NonEmpty<T>> for NonEmpty<T>
[src]
impl<T: Debug> Debug for NonEmpty<T>
[src]
impl<T> StructuralPartialEq for NonEmpty<T>
[src]
Auto Trait Implementations
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,
impl<T> RefUnwindSafe for NonEmpty<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<I> IntoIterator for I where
I: Iterator,
[src]
I: Iterator,
type Item = <I as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = I
Which kind of iterator are we turning this into?
fn into_iter(self) -> I
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,