pub enum Sha256Error {
Length,
NotLowercaseHex,
AllZeros,
}Expand description
Why a SHA-256 hex digest string was refused.
ADR-0006 (Option A) fixes one acceptance set for the whole workspace: exactly 64 lowercase hexadecimal characters, and not the all-zeros placeholder that no real file digest can produce.
Variants§
Length
The digest is not exactly 64 characters long.
NotLowercaseHex
The digest contains a character that is not lowercase hexadecimal.
AllZeros
The digest is the all-zeros placeholder, which is never a real digest.
Implementations§
Trait Implementations§
Source§impl Clone for Sha256Error
impl Clone for Sha256Error
Source§fn clone(&self) -> Sha256Error
fn clone(&self) -> Sha256Error
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 moreimpl Copy for Sha256Error
Source§impl Debug for Sha256Error
impl Debug for Sha256Error
Source§impl Display for Sha256Error
impl Display for Sha256Error
impl Eq for Sha256Error
Source§impl Error for Sha256Error
impl Error for Sha256Error
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 PartialEq for Sha256Error
impl PartialEq for Sha256Error
impl StructuralPartialEq for Sha256Error
Auto Trait Implementations§
impl Forget for Sha256Error
impl Freeze for Sha256Error
impl Move for Sha256Error
impl RefUnwindSafe for Sha256Error
impl Send for Sha256Error
impl Sync for Sha256Error
impl Unpin for Sha256Error
impl UnsafeUnpin for Sha256Error
impl UnwindSafe for Sha256Error
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.