[][src]Struct glsl::syntax::TranslationUnit

pub struct TranslationUnit(pub NonEmpty<ExternalDeclaration>);

Starting rule.

Methods

impl TranslationUnit[src]

pub fn from_non_empty_iter<I>(iter: I) -> Option<Self> where
    I: IntoIterator<Item = ExternalDeclaration>, 
[src]

Construct a translation unit from an iterator representing a non-empty sequence of ExternalDeclaration.

Errors

None if the iterator yields no value.

Methods from Deref<Target = NonEmpty<ExternalDeclaration>>

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 Parse for TranslationUnit[src]

impl Host for TranslationUnit[src]

impl IntoIterator for TranslationUnit[src]

type IntoIter = <NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

type Item = ExternalDeclaration

The type of the elements being iterated over.

impl<'a> IntoIterator for &'a TranslationUnit[src]

type IntoIter = <&'a NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

type Item = &'a ExternalDeclaration

The type of the elements being iterated over.

impl<'a> IntoIterator for &'a mut TranslationUnit[src]

type IntoIter = <&'a mut NonEmpty<ExternalDeclaration> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?

type Item = &'a mut ExternalDeclaration

The type of the elements being iterated over.

impl Clone for TranslationUnit[src]

impl PartialEq<TranslationUnit> for TranslationUnit[src]

impl Debug for TranslationUnit[src]

impl Deref for TranslationUnit[src]

type Target = NonEmpty<ExternalDeclaration>

The resulting type after dereferencing.

impl DerefMut for TranslationUnit[src]

impl StructuralPartialEq for TranslationUnit[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

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?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]