pub struct Sha256String(/* private fields */);Implementations§
Source§impl Sha256String
impl Sha256String
Sourcepub fn from_digest(digest: &Output<Sha256>) -> Self
pub fn from_digest(digest: &Output<Sha256>) -> Self
Creates a Sha256String from a Sha256 digest.
§Examples
use winget_types::{sha2::{Digest, Sha256}, Sha256String};
// Digest some data manually
let sha256_digest = Sha256::digest("abc");
assert_eq!(
Sha256String::from_digest(&sha256_digest).as_str(),
"BA7816BF8F01CFEA414140DE5DAE2223B00361A396177A9CB410FF61F20015AD"
);Trait Implementations§
Source§impl Clone for Sha256String
impl Clone for Sha256String
Source§fn clone(&self) -> Sha256String
fn clone(&self) -> Sha256String
Returns a duplicate of the value. Read more
1.0.0 · 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 Sha256String
impl Debug for Sha256String
Source§impl Default for Sha256String
impl Default for Sha256String
Source§impl Display for Sha256String
impl Display for Sha256String
Source§impl Hash for Sha256String
impl Hash for Sha256String
Source§impl Ord for Sha256String
impl Ord for Sha256String
Source§fn cmp(&self, other: &Sha256String) -> Ordering
fn cmp(&self, other: &Sha256String) -> Ordering
1.21.0 · 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
Source§impl PartialEq for Sha256String
impl PartialEq for Sha256String
Source§impl PartialOrd for Sha256String
impl PartialOrd for Sha256String
impl Eq for Sha256String
impl StructuralPartialEq for Sha256String
Auto Trait Implementations§
impl Freeze for Sha256String
impl RefUnwindSafe for Sha256String
impl Send for Sha256String
impl Sync for Sha256String
impl Unpin for Sha256String
impl UnwindSafe for Sha256String
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<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 moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more