[][src]Struct cheddar::Module

pub struct Module {
    pub imports: Vec<ImportList>,
    pub glsl: GLSL,
}

A module.

A module has a list of imports and a list of GLSL extern declaration.

Fields

imports: Vec<ImportList>

List of imports for this module.

glsl: GLSL

The GLSL body of the module.

Methods

impl Module
[src]

pub fn substitute_imports<C>(
    &self,
    current_key: &FSKey,
    storage: &mut Storage<C>,
    ctx: &mut C
) -> Result<(Self, Vec<FSKey>), ModuleError> where
    C: 'static, 
[src]

Shrink a module along with its imports to yield a bigger module with no import. Return all the visited modules (including the current one).

This is needed whenever the module must be compiled to strings (i.e. Module::to_glsl_setup).

pub fn to_glsl_setup(&self) -> Result<ModuleFold, GLSLConversionError>
[src]

Fold a module into its GLSL setup.

Trait Implementations

impl PartialEq<Module> for Module
[src]

impl Clone for Module
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Module
[src]

impl<C> Load<C, ()> for Module
[src]

type Key = FSKey

Type of the key used to load the resource.

type Error = ModuleError

Type of error that might happen while loading.

fn reload(
    &self,
    key: Self::Key,
    storage: &mut Storage<C>,
    ctx: &mut C
) -> Result<Self, Self::Error>
[src]

Function called when a resource must be reloaded. Read more

Auto Trait Implementations

impl Send for Module

impl Sync for Module

Blanket Implementations

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

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

type Owned = T

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<'a, T, C, M> Inspect for T
[src]

impl<'a, T, C, M> Inspect for T
[src]

impl<'a, T, C, M> Inspect for T
[src]