Struct cheddar::Module [−][src]
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]
impl Module
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]
pub fn substitute_imports<C>(
&self,
current_key: &FSKey,
storage: &mut Storage<C>,
ctx: &mut C
) -> Result<(Self, Vec<FSKey>), ModuleError> where
C: 'static,
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]
pub fn to_glsl_setup(&self) -> Result<ModuleFold, GLSLConversionError>
Fold a module into its GLSL setup.
Trait Implementations
impl Clone for Module
[src]
impl Clone for Module
fn clone(&self) -> Module
[src]
fn clone(&self) -> Module
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for Module
[src]
impl Debug for Module
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Module
[src]
impl PartialEq for Module
fn eq(&self, other: &Module) -> bool
[src]
fn eq(&self, other: &Module) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Module) -> bool
[src]
fn ne(&self, other: &Module) -> bool
This method tests for !=
.
impl<C> Load<C> for Module
[src]
impl<C> Load<C> for Module
type Key = FSKey
Type of the key used to load the resource.
type Error = ModuleError
Type of error that might happen while loading.
fn load(
key: Self::Key,
_: &mut Storage<C>,
_: &mut C
) -> Result<Loaded<Self>, Self::Error>
[src]
fn load(
key: Self::Key,
_: &mut Storage<C>,
_: &mut C
) -> Result<Loaded<Self>, Self::Error>
Load a resource. Read more
fn reload(
&self,
key: Self::Key,
storage: &mut Storage<C>,
ctx: &mut C
) -> Result<Self, Self::Error>
[src]
fn reload(
&self,
key: Self::Key,
storage: &mut Storage<C>,
ctx: &mut C
) -> Result<Self, Self::Error>
Function called when a resource must be reloaded. Read more