pub enum MapError {
Show 18 variants
MapNotFound {
name: String,
},
InvalidMapType {
map_type: u32,
},
InvalidName {
name: String,
},
InvalidPinPath {
error: String,
},
NotCreated,
AlreadyCreated {
name: String,
},
AlreadyPinned {
name: String,
},
CreateError {
name: String,
code: c_long,
io_error: Error,
},
PinError {
name: String,
code: c_long,
io_error: Error,
},
InvalidKeySize {
size: usize,
expected: usize,
},
InvalidValueSize {
size: usize,
expected: usize,
},
OutOfBounds {
index: u32,
max_entries: u32,
},
KeyNotFound,
ElementNotFound,
ProgramNotLoaded,
SyscallError {
call: String,
code: c_long,
io_error: Error,
},
BorrowError {
name: String,
},
BorrowMutError {
name: String,
},
}
Expand description
Errors occuring from working with Maps
Variants
MapNotFound
Fields
name: String
Map name
Unable to find the map
InvalidMapType
Fields
map_type: u32
The map type
Invalid map type encontered
InvalidName
Fields
name: String
The map name
Invalid map name encountered
InvalidPinPath
Fields
error: String
The error message
Pin path is invalid
NotCreated
The map has not been created
AlreadyCreated
Fields
name: String
Map name
The map has already been created
AlreadyPinned
Fields
name: String
Map name
The map has already been pinned
CreateError
Failed to create map
PinError
Failed to pin map
InvalidKeySize
Invalid key size
InvalidValueSize
Invalid value size
OutOfBounds
Index is out of bounds
KeyNotFound
Key not found
ElementNotFound
Element not found
ProgramNotLoaded
Progam Not Loaded
SyscallError
Syscall failed
BorrowError
Fields
name: String
Map name
Map is borrowed mutably
BorrowMutError
Fields
name: String
Map name
Map is already borrowed
Trait Implementations
sourceimpl Error for MapError
impl Error for MapError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
🔬 This is a nightly-only experimental API. (
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for MapError
impl Send for MapError
impl Sync for MapError
impl Unpin for MapError
impl UnwindSafe for MapError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more