Struct gfx::shade::core::ConstVar[][src]

pub struct ConstVar {
    pub name: String,
    pub location: usize,
    pub count: usize,
    pub base_type: BaseType,
    pub container: ContainerType,
}

A constant in the shader - a bit of data that doesn’t vary

Fields

name: String

Name of this constant.

location: usize

Location of this constant in the program. For constant buffer elements, it’s the offset in bytes.

count: usize

Number of elements this constant represents.

base_type: BaseType

Type that this constant is composed of

container: ContainerType

“Scalarness” of this constant.

Implementations

impl ConstVar[src]

pub fn is_compatible(
    &self,
    value: &UniformValue
) -> Result<(), CompatibilityError>
[src]

Whether a value is compatible with this variable. That is, whether the value can be stored in this variable.

Trait Implementations

impl Clone for ConstVar[src]

impl Debug for ConstVar[src]

impl Eq for ConstVar[src]

impl Hash for ConstVar[src]

impl PartialEq<ConstVar> for ConstVar[src]

impl StructuralEq for ConstVar[src]

impl StructuralPartialEq for ConstVar[src]

Auto Trait Implementations

impl RefUnwindSafe for ConstVar

impl Send for ConstVar

impl Sync for ConstVar

impl Unpin for ConstVar

impl UnwindSafe for ConstVar

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.