[][src]Struct luminance::shader::UniformBuilder

pub struct UniformBuilder<'a, B: ?Sized> where
    B: Shader
{ /* fields omitted */ }

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 the Shader trait.

Implementations

impl<'a, B: ?Sized> UniformBuilder<'a, B> where
    B: Shader
[src]

pub fn ask<T, N>(&mut self, name: N) -> Result<Uniform<T>, UniformWarning> where
    N: AsRef<str>,
    T: Uniformable<B>, 
[src]

Ask the creation of a Uniform, identified by its name.

pub fn ask_or_unbound<T, N>(&mut self, name: N) -> Uniform<T> where
    N: AsRef<str>,
    T: Uniformable<B>, 
[src]

Ask the creation of a Uniform, identified by its name.

If the name is not found, an unbound Uniform is returned (i.e. a Uniform) that does nothing.

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

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.