Struct glslt::transform::template::TemplateDefinition [−][src]
Definition of a template function
Implementations
impl TemplateDefinition
[src]
pub fn ast(&self) -> &FunctionDefinition
[src]
Get the AST of this template definition
pub fn parameters(&self) -> &[TemplateParameter]
[src]
Get the list of parameters of this template
pub fn fn_ref(&self) -> Node<FnRef<'_>>
[src]
Get the FnRef definition of this template
pub fn generate_id(&self, args: &[(Expr, &str)]) -> SmolStr
[src]
Generate a unique ID for the given template invocation
Parameters
args
: list of template parameter values used in the invocation
pub fn instantiate(
&self,
scope: &mut LocalScope<'_, '_>,
outer_instantiator: &InstantiateTemplate
) -> Result<Vec<FunctionDefinition>>
[src]
&self,
scope: &mut LocalScope<'_, '_>,
outer_instantiator: &InstantiateTemplate
) -> Result<Vec<FunctionDefinition>>
Instantiate this template definition into a GLSL function
Parameters
scope
: local scope this template is being instantiated from
pub fn extract_template_parameters(
&self,
args: &mut Vec<Expr>
) -> Result<Vec<(Expr, &str)>>
[src]
&self,
args: &mut Vec<Expr>
) -> Result<Vec<(Expr, &str)>>
Extract the template parameters from the full set of call parameters
Parameters
args
: list of all function call arguments
Returns
List of expressions to be used in the template call. args
will contain regular arguments
to the GLSL function (which do not require a template instantiation).
Trait Implementations
impl Clone for TemplateDefinition
[src]
fn clone(&self) -> TemplateDefinition
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TemplateDefinition
[src]
Auto Trait Implementations
impl RefUnwindSafe for TemplateDefinition
impl Send for TemplateDefinition
impl Sync for TemplateDefinition
impl Unpin for TemplateDefinition
impl UnwindSafe for TemplateDefinition
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoResult<T> for T
type Err = Infallible
pub fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,