Enum gbfs::GBFSError

source ·
pub enum GBFSError {
    HeaderInvalid,
    FilenameTooLong(usizeusize),
    Utf8Error(Utf8Error),
    Cast(Error),
    NoSuchFile(ArrayString<FILENAME_LEN>),
    Truncated,
    TooManyEntries(usizeusize),
}
Expand description

Various error conditions that can occur when working with GBFS archives.

Variants§

§

HeaderInvalid

Returned when the archive’s header is not valid.

§

FilenameTooLong(usizeusize)

Returned when a file with a name that’s too long is encountered in the archive or provided by the user.

§

Utf8Error(Utf8Error)

Returned when a filename with invalid UTF-8 is encountered in the archive.

§

Cast(Error)

Returned when casting to the requested slice type fails.

§

NoSuchFile(ArrayString<FILENAME_LEN>)

Returned when a file with the given name does not exist.

§

Truncated

Returned when a file is truncated.

§

TooManyEntries(usizeusize)

Returned when an archive contains too many entries.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

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 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.