#[non_exhaustive]pub enum ResourceStorageError {
Io(Error, String),
Utf8Error(Utf8Error),
MissingSchema(String),
MissingData,
WrongSignature {
resource_name: String,
diff: String,
},
UnexpectedDataSize,
TooBig {
resource_name: &'static str,
size: usize,
},
Missing,
}Expand description
Error indicating failures when reading and writing data from/to a
Storage.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error, String)
Wrapper of io::Error with resource name for which the error
occurred.
Utf8Error(Utf8Error)
Wrapper of Utf8Error.
MissingSchema(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
Indicates that the schema stored in resource storage differs from the expected schema.
Fields
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
A resource is too big, e.g. when references by a small number of bits
Fields
Missing
A resource / archive is missing completely
Implementations§
Source§impl ResourceStorageError
impl ResourceStorageError
Sourcepub fn from_io_error(err: Error, resource_name: String) -> Self
pub fn from_io_error(err: Error, resource_name: String) -> Self
Wraps an io::Error with additional resource name.