pub enum Error {
Show 15 variants
Io {
source: Error,
},
CorruptedObject {
path: PathBuf,
reason: String,
},
InvalidHash {
reason: String,
},
ObjectNotFound {
hash: String,
},
InvalidStore {
path: PathBuf,
reason: String,
},
InvalidRef {
reason: String,
},
RefNotFound {
name: String,
},
InvalidObjectType {
expected: String,
got: String,
},
PathExists {
path: PathBuf,
},
Utf8Error {
source: Utf8Error,
},
InvalidTreeEntry {
reason: String,
},
UnsupportedAlgorithm {
algorithm: String,
},
CompressionError {
reason: String,
},
InvalidChunkList {
reason: String,
},
InvalidChunk {
reason: String,
},
}Expand description
Errors that can occur during store operations.
Variants§
Io
I/O error occurred during file operations.
CorruptedObject
Object file is corrupted or invalid.
InvalidHash
Invalid hash format or encoding.
ObjectNotFound
Object not found in store.
InvalidStore
Store is invalid or not initialized.
InvalidRef
Invalid reference name or format.
RefNotFound
Reference not found.
InvalidObjectType
Invalid object type.
PathExists
Path already exists (for materialization).
Utf8Error
UTF-8 encoding error.
InvalidTreeEntry
Invalid tree entry.
UnsupportedAlgorithm
Unsupported algorithm.
CompressionError
Compression error.
InvalidChunkList
Invalid chunk list.
InvalidChunk
Invalid chunk.
Implementations§
Source§impl Error
impl Error
Sourcepub fn corrupted_object(
path: impl Into<PathBuf>,
reason: impl Into<String>,
) -> Self
pub fn corrupted_object( path: impl Into<PathBuf>, reason: impl Into<String>, ) -> Self
Create a CorruptedObject error.
Sourcepub fn invalid_hash(reason: impl Into<String>) -> Self
pub fn invalid_hash(reason: impl Into<String>) -> Self
Create an InvalidHash error.
Sourcepub fn object_not_found(hash: impl Into<String>) -> Self
pub fn object_not_found(hash: impl Into<String>) -> Self
Create an ObjectNotFound error.
Sourcepub fn invalid_store(
path: impl Into<PathBuf>,
reason: impl Into<String>,
) -> Self
pub fn invalid_store( path: impl Into<PathBuf>, reason: impl Into<String>, ) -> Self
Create an InvalidStore error.
Sourcepub fn invalid_ref(reason: impl Into<String>) -> Self
pub fn invalid_ref(reason: impl Into<String>) -> Self
Create an InvalidRef error.
Sourcepub fn ref_not_found(name: impl Into<String>) -> Self
pub fn ref_not_found(name: impl Into<String>) -> Self
Create a RefNotFound error.
Sourcepub fn invalid_object_type(
expected: impl Into<String>,
got: impl Into<String>,
) -> Self
pub fn invalid_object_type( expected: impl Into<String>, got: impl Into<String>, ) -> Self
Create an InvalidObjectType error.
Sourcepub fn path_exists(path: impl Into<PathBuf>) -> Self
pub fn path_exists(path: impl Into<PathBuf>) -> Self
Create a PathExists error.
Sourcepub fn invalid_tree_entry(reason: impl Into<String>) -> Self
pub fn invalid_tree_entry(reason: impl Into<String>) -> Self
Create an InvalidTreeEntry error.
Sourcepub fn unsupported_algorithm(algorithm: impl Into<String>) -> Self
pub fn unsupported_algorithm(algorithm: impl Into<String>) -> Self
Create an UnsupportedAlgorithm error.
Sourcepub fn compression_error(reason: impl Into<String>) -> Self
pub fn compression_error(reason: impl Into<String>) -> Self
Create a CompressionError error.
Sourcepub fn invalid_chunk_list(reason: impl Into<String>) -> Self
pub fn invalid_chunk_list(reason: impl Into<String>) -> Self
Create an InvalidChunkList error.
Sourcepub fn invalid_chunk(reason: impl Into<String>) -> Self
pub fn invalid_chunk(reason: impl Into<String>) -> Self
Create an InvalidChunk error.