pub enum Error {
InvalidScheme(Url),
MissingObjectType(Url),
MissingHashAlgorithm(Url),
MissingHash(Url),
UnknownObjectType(String),
MismatchedObjectType {
expected: String,
observed: String,
},
MismatchedHashAlgorithm {
expected: String,
observed: String,
},
UnexpectedHashLength {
expected: usize,
observed: usize,
},
InvalidHex(FromHexError),
Url(ParseError),
Io(Error),
}Expand description
An error arising during GitOid construction or use.
Variants§
InvalidScheme(Url)
Tried to construct a GitOid from a Url with a scheme besides gitoid.
MissingObjectType(Url)
Tried to construct a GitOid from a Url without an ObjectType in it.
MissingHashAlgorithm(Url)
Tried to construct a GitOid from a Url without a HashAlgorithm in it.
MissingHash(Url)
Tried to construct a GitOid from a Url without a hash in it.
UnknownObjectType(String)
Tried to parse an unknown object type.
MismatchedObjectType
The expected object type didn’t match the provided type.
MismatchedHashAlgorithm
The expected hash algorithm didn’t match the provided algorithm.
UnexpectedHashLength
The expected size of a hash for an algorithm didn’t match the provided size.
InvalidHex(FromHexError)
Tried to parse an invalid hex string.
Url(ParseError)
Could not construct a valid URL based on the GitOid data.
Io(Error)
Could not perform the IO operations necessary to construct the GitOid.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FromHexError> for Error
impl From<FromHexError> for Error
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more