Struct luminance::shader::UniformBuilder
source · [−]Expand description
A builder of Uniform
.
A UniformBuilder
is an important type as it’s the only one that allows to safely create
Uniform
values.
Parametricity
B
is the backend type. It must implement theShader
trait.
Implementations
sourceimpl<'a, B> UniformBuilder<'a, B> where
B: ?Sized + Shader,
impl<'a, B> UniformBuilder<'a, B> where
B: ?Sized + Shader,
sourcepub fn ask<T>(&mut self, name: &str) -> Result<Uniform<T>, UniformWarning> where
B: for<'u> Uniformable<'u, T>,
pub fn ask<T>(&mut self, name: &str) -> Result<Uniform<T>, UniformWarning> where
B: for<'u> Uniformable<'u, T>,
Ask the creation of a Uniform
, identified by its name
.
sourcepub fn ask_or_unbound<T>(&mut self, name: &str) -> Uniform<T> where
B: for<'u> Uniformable<'u, T>,
pub fn ask_or_unbound<T>(&mut self, name: &str) -> Uniform<T> where
B: for<'u> Uniformable<'u, T>,
Auto Trait Implementations
impl<'a, B: ?Sized> RefUnwindSafe for UniformBuilder<'a, B> where
<B as Shader>::UniformBuilderRepr: RefUnwindSafe,
impl<'a, B: ?Sized> Send for UniformBuilder<'a, B> where
<B as Shader>::UniformBuilderRepr: Send,
impl<'a, B: ?Sized> Sync for UniformBuilder<'a, B> where
<B as Shader>::UniformBuilderRepr: Sync,
impl<'a, B: ?Sized> Unpin for UniformBuilder<'a, B> where
<B as Shader>::UniformBuilderRepr: Unpin,
impl<'a, B> !UnwindSafe for UniformBuilder<'a, B>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more