Enum MemError
pub enum MemError {
Uninitialised {
addr: i64,
},
Misaligned {
addr: i64,
},
NotAByte {
value: i64,
},
Device {
addr: i64,
reason: &'static str,
},
AddressOverflow {
addr: i64,
len: i64,
},
}Expand description
Something went wrong with a memory access.
Variants§
Uninitialised
Read of memory that was never written.
Misaligned
Access not aligned to a word boundary.
NotAByte
A tryte outside 0..=255 was written to a byte-oriented device (D-04).
Device
A device rejected the access.
AddressOverflow
The access would run off the end of the address space.
Implementations§
§impl MemoryError
impl MemoryError
pub fn overshoot(&self) -> Option<i64>
pub fn overshoot(&self) -> Option<i64>
For an AddressOverflow, how many
trytes past the end of the address space the access would have reached.
None for the other variants.
Trait Implementations§
§impl Clone for MemoryError
impl Clone for MemoryError
§fn clone(&self) -> MemoryError
fn clone(&self) -> MemoryError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryError
§impl Debug for MemoryError
impl Debug for MemoryError
§impl Display for MemoryError
impl Display for MemoryError
impl Eq for MemoryError
§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)>
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()
§impl PartialEq for MemoryError
impl PartialEq for MemoryError
impl StructuralPartialEq for MemoryError
Auto Trait Implementations§
impl Freeze for MemoryError
impl RefUnwindSafe for MemoryError
impl Send for MemoryError
impl Sync for MemoryError
impl Unpin for MemoryError
impl UnsafeUnpin 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