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

Fields

name: String

Map name

code: c_long

Error code

io_error: Error

Original io::Error

Failed to create map

PinError

Fields

name: String

Map Name

code: c_long

Error code

io_error: Error

Original io::Error

Failed to pin map

InvalidKeySize

Fields

size: usize

Size encountered

expected: usize

Size expected

Invalid key size

InvalidValueSize

Fields

size: usize

Size encountered

expected: usize

Size expected

Invalid value size

OutOfBounds

Fields

index: u32

Index accessed

max_entries: u32

Map size

Index is out of bounds

KeyNotFound

Key not found

ElementNotFound

Element not found

ProgramNotLoaded

Progam Not Loaded

SyscallError

Fields

call: String

Syscall Name

code: c_long

Error code

io_error: Error

Original io::Error

Syscall failed

BorrowError

Fields

name: String

Map name

Map is borrowed mutably

BorrowMutError

Fields

name: String

Map name

Map is already borrowed

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.