Enum luminance_front::shader::UniformWarning
source · [−]#[non_exhaustive]
pub enum UniformWarning {
Inactive(String),
TypeMismatch(String, UniformType),
UnsupportedType(String, UniformType),
SizeMismatch {
name: String,
size: usize,
found_size: usize,
},
}
Expand description
Warnings related to uniform issues.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Inactive(String)
Inactive uniform (not in use / no participation to the final output in shaders).
TypeMismatch(String, UniformType)
Type mismatch between the static requested type (i.e. the T
in Uniform<T>
for instance)
and the type that got reflected from the backend in the shaders.
The String
is the name of the uniform; the second one gives the type mismatch.
UnsupportedType(String, UniformType)
The requested type is unsupported by the backend.
The String
is the name of the uniform. The UniformType
is the type that is not
supported by the backend.
SizeMismatch
Fields
name: String
Name of the uniform.
size: usize
Size of the uniform (static).
found_size: usize
Found size of the uniform (in the shader).
Size mismatch between the static requested type (i.e. the T
in Uniform<T>
for instance)
and the size that got reflected from the backend in the shaders.
Implementations
sourceimpl UniformWarning
impl UniformWarning
sourcepub fn inactive<N>(name: N) -> UniformWarning where
N: Into<String>,
pub fn inactive<N>(name: N) -> UniformWarning where
N: Into<String>,
Create an inactive uniform warning.
sourcepub fn type_mismatch<N>(name: N, ty: UniformType) -> UniformWarning where
N: Into<String>,
pub fn type_mismatch<N>(name: N, ty: UniformType) -> UniformWarning where
N: Into<String>,
Create a type mismatch.
sourcepub fn unsupported_type<N>(name: N, ty: UniformType) -> UniformWarning where
N: Into<String>,
pub fn unsupported_type<N>(name: N, ty: UniformType) -> UniformWarning where
N: Into<String>,
Create an unsupported type error.
sourcepub fn size_mismatch(
name: impl Into<String>,
size: usize,
found_size: usize
) -> UniformWarning
pub fn size_mismatch(
name: impl Into<String>,
size: usize,
found_size: usize
) -> UniformWarning
Create a size mismatch error.
Trait Implementations
sourceimpl Debug for UniformWarning
impl Debug for UniformWarning
sourceimpl Display for UniformWarning
impl Display for UniformWarning
sourceimpl Error for UniformWarning
impl Error for UniformWarning
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<UniformWarning> for ProgramWarning
impl From<UniformWarning> for ProgramWarning
sourcefn from(e: UniformWarning) -> ProgramWarning
fn from(e: UniformWarning) -> ProgramWarning
Converts to this type from the input type.
sourceimpl PartialEq<UniformWarning> for UniformWarning
impl PartialEq<UniformWarning> for UniformWarning
sourcefn eq(&self, other: &UniformWarning) -> bool
fn eq(&self, other: &UniformWarning) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UniformWarning) -> bool
fn ne(&self, other: &UniformWarning) -> bool
This method tests for !=
.
impl Eq for UniformWarning
impl StructuralEq for UniformWarning
impl StructuralPartialEq for UniformWarning
Auto Trait Implementations
impl RefUnwindSafe for UniformWarning
impl Send for UniformWarning
impl Sync for UniformWarning
impl Unpin for UniformWarning
impl UnwindSafe for UniformWarning
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