diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:41:41 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 12:41:41 +0000 |
commit | 10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch) | |
tree | bdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/gix/src/object/errors.rs | |
parent | Releasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff) | |
download | rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip |
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix/src/object/errors.rs')
-rw-r--r-- | vendor/gix/src/object/errors.rs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/gix/src/object/errors.rs b/vendor/gix/src/object/errors.rs new file mode 100644 index 000000000..eb7733473 --- /dev/null +++ b/vendor/gix/src/object/errors.rs @@ -0,0 +1,34 @@ +/// +pub mod conversion { + + /// The error returned by [`crate::object::try_to_()`][crate::Object::try_to_commit_ref()]. + #[derive(Debug, thiserror::Error)] + #[allow(missing_docs)] + pub enum Error { + #[error(transparent)] + Decode(#[from] gix_object::decode::Error), + #[error("Expected object type {}, but got {}", .expected, .actual)] + UnexpectedType { + expected: gix_object::Kind, + actual: gix_object::Kind, + }, + } +} + +/// +pub mod find { + /// Indicate that an error occurred when trying to find an object. + pub type Error = gix_odb::store::find::Error; + + /// + pub mod existing { + /// An object could not be found in the database, or an error occurred when trying to obtain it. + pub type Error = gix_odb::find::existing::Error<gix_odb::store::find::Error>; + } +} + +/// +pub mod write { + /// An error to indicate writing to the loose object store failed. + pub type Error = gix_odb::store::write::Error; +} |