#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
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§
Source§impl ProgramError
impl ProgramError
Sourcepub fn creation_failed(reason: impl Into<String>) -> ProgramError
pub fn creation_failed(reason: impl Into<String>) -> ProgramError
Creating the program failed.
Sourcepub fn stage_error(e: StageError) -> ProgramError
pub fn stage_error(e: StageError) -> ProgramError
A shader stage failed to compile or validate its state.
Sourcepub fn link_failed(reason: impl Into<String>) -> ProgramError
pub fn link_failed(reason: impl Into<String>) -> ProgramError
Program link failed. You can inspect the reason by looking at the contained String.
Sourcepub fn warning(w: ProgramWarning) -> ProgramError
pub fn warning(w: ProgramWarning) -> ProgramError
A program warning.
Trait Implementations§
Source§impl Debug for ProgramError
impl Debug for ProgramError
Source§impl Display for ProgramError
impl Display for ProgramError
Source§impl Error for ProgramError
impl Error for ProgramError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ProgramWarning> for ProgramError
impl From<ProgramWarning> for ProgramError
Source§fn from(e: ProgramWarning) -> ProgramError
fn from(e: ProgramWarning) -> ProgramError
Converts to this type from the input type.
Source§impl From<StageError> for ProgramError
impl From<StageError> for ProgramError
Source§fn from(e: StageError) -> ProgramError
fn from(e: StageError) -> ProgramError
Converts to this type from the input type.
Source§impl PartialEq for ProgramError
impl PartialEq for ProgramError
impl Eq for ProgramError
impl StructuralPartialEq for ProgramError
Auto Trait Implementations§
impl Freeze for ProgramError
impl RefUnwindSafe for ProgramError
impl Send for ProgramError
impl Sync for ProgramError
impl Unpin for ProgramError
impl UnwindSafe for ProgramError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more