pub enum MapError {
Show 17 variants
MissingInnerMapDefinition {
outer_name: String,
},
InvalidMapType {
map_type: u32,
},
InvalidName {
name: String,
},
CreateError {
name: String,
io_error: Error,
},
InvalidKeySize {
size: usize,
expected: usize,
},
InvalidValueSize {
size: usize,
expected: usize,
},
InvalidValueStride {
size: usize,
stride: usize,
},
OutOfBounds {
index: u32,
max_entries: u32,
},
KeyNotFound,
ElementNotFound,
ProgramNotLoaded,
IoError(Error),
SyscallError(SyscallError),
PinError {
name: Option<String>,
error: PinError,
},
ProgIdNotSupported,
Unsupported {
name: String,
map_type: bpf_map_type,
},
UnsupportedMapFlags {
flags: u32,
reason: &'static str,
},
}Expand description
Errors occurring from working with Maps
Variants§
MissingInnerMapDefinition
Missing inner map BTF definition for a map-of-maps.
InvalidMapType
Invalid map type encontered
InvalidName
Invalid map name encountered
CreateError
Failed to create map
InvalidKeySize
Invalid key size
InvalidValueSize
Invalid value size
InvalidValueStride
Invalid value stride
OutOfBounds
Index is out of bounds
KeyNotFound
Key not found
ElementNotFound
Element not found
ProgramNotLoaded
Program Not Loaded
IoError(Error)
An IO error occurred
SyscallError(SyscallError)
Syscall failed
PinError
Could not pin map
ProgIdNotSupported
Program IDs are not supported
Unsupported
Unsupported Map type
UnsupportedMapFlags
Unsupported map flags
Trait Implementations§
Source§impl Error for MapError
impl Error for MapError
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 From<InvalidTypeBinding<u32>> for MapError
impl From<InvalidTypeBinding<u32>> for MapError
Source§fn from(e: InvalidTypeBinding<u32>) -> Self
fn from(e: InvalidTypeBinding<u32>) -> Self
Converts to this type from the input type.
Source§impl From<MapError> for ProgramError
impl From<MapError> for ProgramError
Source§impl From<MapError> for XdpMapError
impl From<MapError> for XdpMapError
Source§impl From<SyscallError> for MapError
impl From<SyscallError> for MapError
Source§fn from(source: SyscallError) -> Self
fn from(source: SyscallError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MapError
impl !RefUnwindSafe for MapError
impl Send for MapError
impl Sync for MapError
impl Unpin for MapError
impl UnsafeUnpin for MapError
impl !UnwindSafe for MapError
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