pub enum CommitError {
Malformed(String),
NotACommit(String),
Unverified,
Version {
found: i64,
},
WrongRepo {
found: String,
expected: String,
},
}Expand description
Why a commit could not be trusted.
Variants§
Malformed(String)
The signature is not 64 bytes, or is not a pair the key’s curve has.
NotACommit(String)
The block is not a commit: not the six fields a version 3 commit has, or a field of the wrong type.
Unverified
The signature does not verify against the key it was checked with.
This is the interesting one, and it does not distinguish between the three ways it happens — a tampered commit, a substituted key, or a signature from somebody else — because a verifier cannot tell them apart and a message that guessed would be a message that misled.
Version
The commit names a repository format this crate does not write.
WrongRepo
The commit’s did is not the repository that was asked about.
Trait Implementations§
Source§impl Clone for CommitError
impl Clone for CommitError
Source§fn clone(&self) -> CommitError
fn clone(&self) -> CommitError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CommitError
impl Debug for CommitError
Source§impl Display for CommitError
impl Display for CommitError
Source§impl Error for CommitError
impl Error for CommitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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<CommitError> for ProofError
impl From<CommitError> for ProofError
Source§fn from(source: CommitError) -> Self
fn from(source: CommitError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CommitError
impl PartialEq for CommitError
Source§fn eq(&self, other: &CommitError) -> bool
fn eq(&self, other: &CommitError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CommitError
impl StructuralPartialEq for CommitError
Auto Trait Implementations§
impl Freeze for CommitError
impl RefUnwindSafe for CommitError
impl Send for CommitError
impl Sync for CommitError
impl Unpin for CommitError
impl UnsafeUnpin for CommitError
impl UnwindSafe for CommitError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.