[][src]Enum glsl::syntax::ExternalDeclaration

pub enum ExternalDeclaration {
    Preprocessor(Preprocessor),
    FunctionDefinition(FunctionDefinition),
    Declaration(Declaration),
}

External declaration.

Variants

Preprocessor(Preprocessor)
FunctionDefinition(FunctionDefinition)
Declaration(Declaration)

Methods

impl ExternalDeclaration[src]

pub fn new_fn<T, N, A, S>(ret_ty: T, name: N, args: A, body: S) -> Self where
    T: Into<FullySpecifiedType>,
    N: Into<Identifier>,
    A: IntoIterator<Item = FunctionParameterDeclaration>,
    S: IntoIterator<Item = Statement>, 
[src]

Create a new function.

pub fn new_struct<N, F>(name: N, fields: F) -> Option<Self> where
    N: Into<TypeName>,
    F: IntoIterator<Item = StructFieldSpecifier>, 
[src]

Create a new structure.

Errors

  • None if no fields are provided. GLSL forbids having empty structs.

Trait Implementations

impl Clone for ExternalDeclaration[src]

impl Debug for ExternalDeclaration[src]

impl Host for ExternalDeclaration[src]

impl Parse for ExternalDeclaration[src]

impl PartialEq<ExternalDeclaration> for ExternalDeclaration[src]

impl StructuralPartialEq for ExternalDeclaration[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.