pub enum Error {
Show 18 variants Failed, Domain, LatLonDomain, ResDomain, CellInvalid, DirectedEdgeInvalid, UndirectedEdgeInvalid, VertexInvalid, Pentagon, DuplicateInput, NotNeighbors, ResMismatch, MemoryAlloc, MemoryBounds, OptionInvalid, UnknownError(u32), DirectionInvalid(u8), DecompressionError(String),
}
Expand description

Errors as defines in RFC 4.0.0, extended with some custom errors of this wrapper library.

Variants

Failed

The operation failed but a more specific error is not available

Domain

Argument was outside of acceptable range (when a more specific error code is not available)

LatLonDomain

Latitude or longitude arguments were outside of acceptable range

ResDomain

Resolution argument was outside of acceptable range

CellInvalid

H3Index cell argument was not valid

DirectedEdgeInvalid

H3Index directed edge argument was not valid

UndirectedEdgeInvalid

H3Index undirected edge argument was not valid

VertexInvalid

H3Index vertex argument was not valid

Pentagon

Pentagon distortion was encountered which the algorithm could not handle it

DuplicateInput

Duplicate input was encountered in the arguments and the algorithm could not handle it

NotNeighbors

H3Index cell arguments were not neighbors

ResMismatch

H3Index cell arguments had incompatible resolutions

MemoryAlloc

Necessary memory allocation failed

MemoryBounds

Bounds of provided memory were not large enough

OptionInvalid

Mode or flags argument was not valid.

UnknownError(u32)

Unknown error code

DirectionInvalid(u8)

Invalid H3 direction

DecompressionError(String)

Implementations

Checks if the H3 return value is an error

checks the return code of h3ron-h3-sys functions

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

👎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

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

Provides type based access to context intended for error reports. Read more

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

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

Data providers should implement this method to provide all values they are able to provide by using demand. Read more

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.