Enum flatdata::ResourceStorageError [−][src]
pub enum ResourceStorageError {
Io(Error, String),
Utf8Error(Utf8Error),
MissingSchema(String),
WrongSignature {
resource_name: String,
diff: String,
},
UnexpectedDataSize,
}Error indicating failures when reading and writing data from/to a
Storage.
Variants
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.
WrongSignatureIndicates that the schema stored in resource storage differs from the expected schema.
Fields of WrongSignature
resource_name: String | Resource name for which the error occurred. |
diff: String | Diff from the stored schema to the expected schema. |
UnexpectedDataSizeIndicates 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.
Methods
impl ResourceStorageError[src]
impl ResourceStorageErrorpub fn from_io_error(err: Error, resource_name: String) -> Self[src]
pub fn from_io_error(err: Error, resource_name: String) -> SelfWraps an io::Error with additional resource name.
Trait Implementations
impl Debug for ResourceStorageError[src]
impl Debug for ResourceStorageErrorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for ResourceStorageError[src]
impl Display for ResourceStorageErrorfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Error for ResourceStorageError[src]
impl Error for ResourceStorageErrorAuto Trait Implementations
impl Send for ResourceStorageError
impl Send for ResourceStorageErrorimpl Sync for ResourceStorageError
impl Sync for ResourceStorageError