Enum flatdata::ResourceStorageError
source · #[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
Fields
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
A resource is too big, e.g. when references by a small number of bits
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.