Enum luminance::shader::ProgramError
source · [−]#[non_exhaustive]
pub enum ProgramError {
CreationFailed(String),
StageError(StageError),
LinkFailed(String),
Warning(ProgramWarning),
}
Expand description
Errors that a Program
can generate.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
CreationFailed(String)
Creating the program failed.
StageError(StageError)
A shader stage failed to compile or validate its state.
LinkFailed(String)
Program link failed. You can inspect the reason by looking at the contained String
.
Warning(ProgramWarning)
A program warning.
Implementations
sourceimpl ProgramError
impl ProgramError
sourcepub fn creation_failed(reason: impl Into<String>) -> Self
pub fn creation_failed(reason: impl Into<String>) -> Self
Creating the program failed.
sourcepub fn stage_error(e: StageError) -> Self
pub fn stage_error(e: StageError) -> Self
A shader stage failed to compile or validate its state.
sourcepub fn link_failed(reason: impl Into<String>) -> Self
pub fn link_failed(reason: impl Into<String>) -> Self
Program link failed. You can inspect the reason by looking at the contained String
.
sourcepub fn warning(w: ProgramWarning) -> Self
pub fn warning(w: ProgramWarning) -> Self
A program warning.
Trait Implementations
sourceimpl Debug for ProgramError
impl Debug for ProgramError
sourceimpl Display for ProgramError
impl Display for ProgramError
sourceimpl Error for ProgramError
impl Error for ProgramError
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<ProgramWarning> for ProgramError
impl From<ProgramWarning> for ProgramError
sourcefn from(e: ProgramWarning) -> Self
fn from(e: ProgramWarning) -> Self
Converts to this type from the input type.
sourceimpl From<StageError> for ProgramError
impl From<StageError> for ProgramError
sourcefn from(e: StageError) -> Self
fn from(e: StageError) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<ProgramError> for ProgramError
impl PartialEq<ProgramError> for ProgramError
sourcefn eq(&self, other: &ProgramError) -> bool
fn eq(&self, other: &ProgramError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ProgramError) -> bool
fn ne(&self, other: &ProgramError) -> bool
This method tests for !=
.
impl Eq for ProgramError
impl StructuralEq for ProgramError
impl StructuralPartialEq for ProgramError
Auto Trait Implementations
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnwindSafe for ProgramError
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