pub enum MemoryError {
MemoryWrongSize,
MemoryBadAccess,
MemoryWrongType {
expected: &'static str,
actual: String,
},
InvalidEnumVariant {
expected_type: String,
actual: String,
valid_variants: Vec<&'static str>,
},
StackEmpty,
StackNotPrimitive {
actual_length: usize,
},
NotEnoughFields,
}
Expand description
Errors that could occur when reading a type from KittyCAD Execution Plan program memory.
Variants§
MemoryWrongSize
Something went wrong
MemoryBadAccess
Something went very wrong
MemoryWrongType
Fields
Type error, memory contained the wrong type.
InvalidEnumVariant
Fields
When trying to read an enum from memory, found a variant tag which is not valid for this enum.
StackEmpty
Stack is empty
StackNotPrimitive
Fields
Stack should have contained a single primitive but it had a composite value instead.
NotEnoughFields
You didn’t supply enough fields – you have to supply one field per field of the original struct
Trait Implementations§
source§impl Debug for MemoryError
impl Debug for MemoryError
source§impl Display for MemoryError
impl Display for MemoryError
source§impl Error for MemoryError
impl Error for MemoryError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl Freeze for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnwindSafe for MemoryError
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