pub enum FilestoreError {
IoError(String),
TomlSerError(Error),
TomlDeError(Error),
JsonSerError(Error),
InvalidPath(String),
DirectoryCreationFailed(String),
FileNotFound(String),
ParseError(String),
SerializationError(String),
}Expand description
Errors that can occur in the filestore
Variants§
IoError(String)
Represents general I/O errors that occur during file operations.
This includes file not found errors, permission issues, etc.
TomlSerError(Error)
Represents errors that occur when serializing data to TOML format.
This typically happens when data structures contain types that cannot be serialized to TOML.
TomlDeError(Error)
Represents errors that occur when deserializing data from TOML format.
This can happen when the TOML content doesn’t match the expected structure.
JsonSerError(Error)
Represents errors that occur when serializing or deserializing JSON data.
This typically occurs when JSON data doesn’t match the expected structure or when data structures cannot be serialized to valid JSON.
InvalidPath(String)
Indicates that a provided file or directory path is invalid.
This could be due to path components containing invalid characters, or paths that are too long for the operating system.
DirectoryCreationFailed(String)
Indicates that creating a directory failed.
This could be due to permissions, the parent directory not existing, or the path already exists as a file.
FileNotFound(String)
Indicates that a requested file could not be found.
This typically occurs when trying to read from a non-existent file.
ParseError(String)
Represents errors that occur when parsing file contents.
This could include syntax errors in configuration files or invalid data formats.
SerializationError(String)
Represents errors that occur when serializing data to any format.
This is a general error for serialization issues that aren’t specific to a particular format like TOML or JSON.
Trait Implementations§
Source§impl Debug for FilestoreError
impl Debug for FilestoreError
Source§impl Display for FilestoreError
impl Display for FilestoreError
Source§impl Error for FilestoreError
impl Error for FilestoreError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()