Enum flatdata::ResourceStorageError[][src]

pub enum ResourceStorageError {
    Io(ErrorString),
    Utf8Error(Utf8Error),
    MissingSchema(String),
    MissingData,
    WrongSignature {
        resource_name: String,
        diff: String,
    },
    UnexpectedDataSize,
    TooBig {
        resource_name: &'static str,
        size: usize,
    },
    Missing,
    // some variants omitted
}
Expand description

Error indicating failures when reading and writing data from/to a Storage.

Variants

Io(ErrorString)

Tuple Fields

0: Error
1: String

Wrapper of io::Error with resource name for which the error occurred.

Utf8Error(Utf8Error)

Tuple Fields

Wrapper of Utf8Error.

MissingSchema(String)

Tuple Fields

0: String

Indicates that schema for the resource with stored name is missing in resource storage.

MissingData

Indicates that part of the data is missing, e.g. one file of a multi_vector

WrongSignature

Fields

resource_name: String

Resource name for which the error occurred.

diff: String

Diff from the stored schema to the expected schema.

Indicates that the schema stored in resource storage differs from the expected schema.

UnexpectedDataSize

Indicates that the size of the data does not fit to the serialized control size.

When data is serialized to resource storage, a control header is written which, in particular, contains the final size of the whole resource.

TooBig

Fields

resource_name: &'static str

Resource name for which the error occurred.

size: usize

Size of the resource

A resource is too big, e.g. when references by a small number of bits

Missing

A resource / archive is missing completely

Implementations

Wraps an io::Error with additional resource name.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

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

replaced by Error::source, which can support downcasting

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.

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.