Struct rin::util::Lazy[][src]

pub struct Lazy<T> { /* fields omitted */ }

A Lazy value that defers computations until the result is needed for the first time

Implementations

impl<T> Lazy<T>[src]

pub fn defer<F>(f: F) -> Lazy<T> where
    F: FnOnce() -> T + 'static, 
[src]

pub fn defer_with_input<F, I>(input: I, f: F) -> Lazy<T> where
    F: FnOnce(I) -> T + 'static,
    I: 'static, 
[src]

pub fn force(&self)[src]

pub fn computed(t: T) -> Lazy<T>[src]

pub fn unwrap(self) -> T[src]

Trait Implementations

impl<T> Borrow<T> for Lazy<T>[src]

impl<T> BorrowMut<T> for Lazy<T>[src]

impl<T> Deref for Lazy<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for Lazy<T>[src]

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for Lazy<T>

impl<T> !Send for Lazy<T>

impl<T> !Sync for Lazy<T>

impl<T> Unpin for Lazy<T> where
    T: Unpin

impl<T> !UnwindSafe for Lazy<T>

Blanket Implementations

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

impl<T> Any for T where
    T: Any
[src]

impl<C> AsUniform<CubeMap> for C where
    C: Borrow<CubeMap>, 
[src]

impl<'a, C> AsUniform<CubeMapSampler<'a>> for C where
    C: Borrow<CubeMapSampler<'a>>, 
[src]

impl<T> AsUniform<Texture> for T where
    T: Borrow<Texture>, 
[src]

impl<'a, T> AsUniform<TextureSampler<'a>> for T where
    T: Borrow<TextureSampler<'a>>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [[f32; 3]; 3]> + 'static> for U where
    T: AsUniform<[[f32; 3]; 3]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [[f32; 4]; 4]> + 'static> for U where
    T: AsUniform<[[f32; 4]; 4]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [f32; 2]> + 'static> for U where
    T: AsUniform<[f32; 2]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [f32; 3]> + 'static> for U where
    T: AsUniform<[f32; 3]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [f32; 4]> + 'static> for U where
    T: AsUniform<dyn AsRef<[f32; 4]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [i32; 2]> + 'static> for U where
    T: AsUniform<[i32; 2]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [i32; 3]> + 'static> for U where
    T: AsUniform<[i32; 3]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [i32; 4]> + 'static> for U where
    T: AsUniform<dyn AsRef<[i32; 4]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [u32; 2]> + 'static> for U where
    T: AsUniform<[u32; 2]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [u32; 3]> + 'static> for U where
    T: AsUniform<[u32; 3]>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = [u32; 4]> + 'static> for U where
    T: AsUniform<dyn AsRef<[u32; 4]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[[f32; 3]; 3]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[[f32; 3]; 3]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[[f32; 4]; 4]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[[f32; 4]; 4]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[f32; 2]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[f32; 2]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[f32; 3]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[f32; 3]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[i32; 2]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[i32; 2]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[i32; 3]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[i32; 3]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[u32; 2]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[u32; 2]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<[u32; 3]> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<[u32; 3]> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<f32> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<f32> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<i32> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<i32> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = dyn AsRef<u32> + 'static> + 'static> for U where
    T: AsUniform<dyn AsRef<u32> + 'static>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = i32> + 'static> for U where
    T: AsUniform<i32>,
    U: Deref<Target = T>, 
[src]

impl<U, T> AsUniform<dyn Deref<Target = u32> + 'static> for U where
    T: AsUniform<u32>,
    U: Deref<Target = T>, 
[src]

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

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

impl<T> Downcast for T where
    T: Any
[src]

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

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

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

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]