pub enum Error {
InvalidScheme(Url),
MissingObjectType(Url),
MissingHashAlgorithm(Url),
MissingHash(Url),
UnknownObjectType,
MismatchedObjectType {
expected: &'static str,
},
MismatchedHashAlgorithm {
expected: &'static str,
},
UnexpectedHashLength {
expected: usize,
observed: usize,
},
UnexpectedReadLength {
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
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.
UnexpectedReadLength
The amount of data read didn’t match the expected amount of data
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.