pub struct Unit { /* private fields */ }
Expand description

GLSLT template instantiation context

Implementations

Create a new transform unit

Create a new transform unit using pre-defined templates

Parameters
  • global_scope: context to pull pre-defined templates from

Create a new transform unit with the given configuration

Parameters
  • config: transform configuration

Transform this unit into a GLSL syntax tree

All the declarations given as input will be included in-order in the output, with the template instantiations interleaved when needed.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Obtain a reference to the template definition context

Obtain a mutable reference to the template definition context

Add a function declaration to the transform unit Read more

Parse a GLSLT declaration and add it to the transform unit Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.