Struct glsl::syntax::TranslationUnit [−][src]
pub struct TranslationUnit(pub NonEmpty<ExternalDeclaration>);
Starting rule.
Implementations
impl TranslationUnit
[src]
impl TranslationUnit
[src]pub fn from_non_empty_iter<I>(iter: I) -> Option<Self> where
I: IntoIterator<Item = ExternalDeclaration>,
[src]
I: IntoIterator<Item = ExternalDeclaration>,
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 Clone for TranslationUnit
[src]
impl Clone for TranslationUnit
[src]fn clone(&self) -> TranslationUnit
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Deref for TranslationUnit
[src]
impl Deref for TranslationUnit
[src]impl IntoIterator 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.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> IntoIterator for &'a TranslationUnit
[src]
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.
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a> IntoIterator for &'a mut TranslationUnit
[src]
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.
fn into_iter(self) -> Self::IntoIter
[src]
impl Parse for TranslationUnit
[src]
impl Parse for TranslationUnit
[src]impl PartialEq<TranslationUnit> for TranslationUnit
[src]
impl PartialEq<TranslationUnit> for TranslationUnit
[src]