pub struct Sha256Hash(pub [u8; 32]);Expand description
A 256-bit SHA-256 content hash used for sequences and file checksums.
Tuple Fields§
§0: [u8; 32]Implementations§
Source§impl Sha256Hash
impl Sha256Hash
Sourcepub fn convert_str(value: &str) -> Self
pub fn convert_str(value: &str) -> Self
Calculates the SHA-256 digest of a string.
Trait Implementations§
Source§impl Clone for Sha256Hash
impl Clone for Sha256Hash
impl Copy for Sha256Hash
Source§impl Debug for Sha256Hash
impl Debug for Sha256Hash
Source§impl Default for Sha256Hash
impl Default for Sha256Hash
Source§impl<'de> Deserialize<'de> for Sha256Hash
impl<'de> Deserialize<'de> for Sha256Hash
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for Sha256Hash
impl Display for Sha256Hash
impl Eq for Sha256Hash
Source§impl From<Sha256Hash> for Value
impl From<Sha256Hash> for Value
Source§fn from(hash: Sha256Hash) -> Self
fn from(hash: Sha256Hash) -> Self
Converts to this type from the input type.
Source§impl FromSql for Sha256Hash
impl FromSql for Sha256Hash
Source§fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
fn column_result(value: ValueRef<'_>) -> FromSqlResult<Self>
Converts SQLite value into Rust value.
Source§impl Hash for Sha256Hash
impl Hash for Sha256Hash
Source§impl Ord for Sha256Hash
impl Ord for Sha256Hash
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for Sha256Hash
impl PartialEq for Sha256Hash
Source§impl PartialOrd for Sha256Hash
impl PartialOrd for Sha256Hash
Source§impl Serialize for Sha256Hash
impl Serialize for Sha256Hash
impl StructuralPartialEq for Sha256Hash
Source§impl ToSql for Sha256Hash
impl ToSql for Sha256Hash
Source§fn to_sql(&self) -> Result<ToSqlOutput<'_>>
fn to_sql(&self) -> Result<ToSqlOutput<'_>>
Converts Rust value to SQLite value
Source§impl TryFrom<&[u8]> for Sha256Hash
impl TryFrom<&[u8]> for Sha256Hash
Source§impl TryFrom<&str> for Sha256Hash
impl TryFrom<&str> for Sha256Hash
Auto Trait Implementations§
impl Freeze for Sha256Hash
impl RefUnwindSafe for Sha256Hash
impl Send for Sha256Hash
impl Sync for Sha256Hash
impl Unpin for Sha256Hash
impl UnsafeUnpin for Sha256Hash
impl UnwindSafe for Sha256Hash
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more