pub enum BytecodeError {
InvalidLength(usize),
MisalignedPointer,
}Expand description
Error returned when SPIR-V bytecode has invalid alignment or size.
§Examples
use vulkan_rust::BytecodeError;
let err = BytecodeError::InvalidLength(7);
assert_eq!(err.to_string(), "SPIR-V byte length 7 is not a multiple of 4");
let err = BytecodeError::MisalignedPointer;
assert!(err.to_string().contains("not 4-byte aligned"));Variants§
InvalidLength(usize)
Length is not a multiple of 4.
MisalignedPointer
Pointer is not aligned to 4 bytes.
Trait Implementations§
Source§impl Clone for BytecodeError
impl Clone for BytecodeError
Source§fn clone(&self) -> BytecodeError
fn clone(&self) -> BytecodeError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BytecodeError
impl Debug for BytecodeError
Source§impl Display for BytecodeError
impl Display for BytecodeError
Source§impl Error for BytecodeError
impl Error for BytecodeError
1.30.0 · 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 PartialEq for BytecodeError
impl PartialEq for BytecodeError
impl Copy for BytecodeError
impl Eq for BytecodeError
impl StructuralPartialEq for BytecodeError
Auto Trait Implementations§
impl Freeze for BytecodeError
impl RefUnwindSafe for BytecodeError
impl Send for BytecodeError
impl Sync for BytecodeError
impl Unpin for BytecodeError
impl UnsafeUnpin for BytecodeError
impl UnwindSafe for BytecodeError
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