]> git.proxmox.com Git - rustc.git/blob - vendor/gix/src/object/errors.rs
New upstream version 1.70.0+dfsg2
[rustc.git] / vendor / gix / src / object / errors.rs
1 ///
2 pub mod conversion {
3
4 /// The error returned by [`crate::object::try_to_()`][crate::Object::try_to_commit_ref()].
5 #[derive(Debug, thiserror::Error)]
6 #[allow(missing_docs)]
7 pub enum Error {
8 #[error(transparent)]
9 Decode(#[from] gix_object::decode::Error),
10 #[error("Expected object type {}, but got {}", .expected, .actual)]
11 UnexpectedType {
12 expected: gix_object::Kind,
13 actual: gix_object::Kind,
14 },
15 }
16 }
17
18 ///
19 pub mod find {
20 /// Indicate that an error occurred when trying to find an object.
21 pub type Error = gix_odb::store::find::Error;
22
23 ///
24 pub mod existing {
25 /// An object could not be found in the database, or an error occurred when trying to obtain it.
26 pub type Error = gix_odb::find::existing::Error<gix_odb::store::find::Error>;
27 }
28 }
29
30 ///
31 pub mod write {
32 /// An error to indicate writing to the loose object store failed.
33 pub type Error = gix_odb::store::write::Error;
34 }