pub enum ErrorCode {
Show 26 variants BadBucketId, BadRequest, BucketMissingFileLock, DuplicateBucketName, FileNotPresent, InvalidBucketId, InvalidFileId, NoSuchFile, OutOfRange, TooManyBuckets, AccessDenied, BadAuthToken, ExpiredAuthToken, Unauthorized, Unsupported, CapExceeded, StorageCapExceeded, TransactionCapExceeded, NotFound, MethodNotAllowed, RequestTimeout, Conflict, RangeNotSatisfiable, InternalError, ServiceUnavailable, Unknown(String),
}
Expand description

An error code from the B2 API.

The HTTP status code is not necessarily constant for any given error code. See the B2 documentation for the relevant API call to match HTTP status codes and B2 error codes.

Variants

BadBucketId

BadRequest

BucketMissingFileLock

DuplicateBucketName

FileNotPresent

InvalidBucketId

InvalidFileId

NoSuchFile

OutOfRange

TooManyBuckets

AccessDenied

BadAuthToken

ExpiredAuthToken

Unauthorized

Unsupported

CapExceeded

StorageCapExceeded

TransactionCapExceeded

NotFound

MethodNotAllowed

RequestTimeout

Conflict

RangeNotSatisfiable

InternalError

ServiceUnavailable

Unknown(String)

The B2 service returned an unknown error code.

If you receive this in practice, please file an issue or submit a patch to support the error code.

Trait Implementations

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. 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

Performs the conversion.

Performs the conversion.

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.