#[non_exhaustive]pub enum VerifyError {
Empty,
TooLong {
length: usize,
},
NoMemory,
UnsupportedOpcode {
pc: usize,
code: u16,
},
ImmediateDivisionByZero {
pc: usize,
},
ImmediateShiftOutOfRange {
pc: usize,
shift: u32,
},
ScratchOutOfRange {
pc: usize,
index: u32,
},
ScratchUninitialized {
pc: usize,
index: u32,
},
JumpOutOfRange {
pc: usize,
},
MissingFinalReturn,
}Expand description
Failure while validating and owning one classic-BPF program.
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.
Empty
A program must contain at least one instruction.
TooLong
The program exceeds MAX_INSTRUCTIONS.
NoMemory
Storage needed for validation or the owned program could not be reserved.
UnsupportedOpcode
The opcode is not part of the supported ordinary classic-BPF set.
ImmediateDivisionByZero
An immediate divisor or modulus was zero.
ImmediateShiftOutOfRange
An immediate shift count was outside 0..32.
ScratchOutOfRange
A scratch-memory index was outside the sixteen-word store.
ScratchUninitialized
A reachable path loads a scratch word not initialized on every path.
JumpOutOfRange
A jump target was outside the program.
MissingFinalReturn
The final instruction was not a return.
Trait Implementations§
Source§impl Clone for VerifyError
impl Clone for VerifyError
impl Copy for VerifyError
Source§impl Debug for VerifyError
impl Debug for VerifyError
Source§impl Display for VerifyError
impl Display for VerifyError
impl Eq for VerifyError
Source§impl PartialEq for VerifyError
impl PartialEq for VerifyError
impl StructuralPartialEq for VerifyError
Auto Trait Implementations§
impl Forget for VerifyError
impl Freeze for VerifyError
impl RefUnwindSafe for VerifyError
impl Send for VerifyError
impl Sync for VerifyError
impl Unpin for VerifyError
impl UnsafeUnpin for VerifyError
impl UnwindSafe for VerifyError
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