Struct clarity_repl::clarity::util::bitcoin::util::hash::Sha256dHash
source · [−]Expand description
A Bitcoin hash, 32-bytes, computed from x as SHA256(SHA256(x))
Tuple Fields
0: [u8; 32]
Implementations
sourceimpl Sha256dHash
impl Sha256dHash
sourceimpl Sha256dHash
impl Sha256dHash
sourcepub fn from_data(data: &[u8]) -> Sha256dHash
pub fn from_data(data: &[u8]) -> Sha256dHash
Create a hash by hashing some data
sourcepub fn from_hex(s: &str) -> Result<Sha256dHash, HexError>
pub fn from_hex(s: &str) -> Result<Sha256dHash, HexError>
Decodes a big-endian (i.e. reversed vs sha256sum output) hex string as a Sha256dHash
sourcepub fn le_hex_string(&self) -> String
pub fn le_hex_string(&self) -> String
Human-readable hex output
sourcepub fn be_hex_string(&self) -> String
pub fn be_hex_string(&self) -> String
Human-readable hex output
Trait Implementations
sourceimpl Clone for Sha256dHash
impl Clone for Sha256dHash
sourcefn clone(&self) -> Sha256dHash
fn clone(&self) -> Sha256dHash
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<D: SimpleDecoder> ConsensusDecodable<D> for Sha256dHash
impl<D: SimpleDecoder> ConsensusDecodable<D> for Sha256dHash
sourcefn consensus_decode(d: &mut D) -> Result<Sha256dHash, Error>
fn consensus_decode(d: &mut D) -> Result<Sha256dHash, Error>
Decode an object with a well-defined format
sourceimpl<S: SimpleEncoder> ConsensusEncodable<S> for Sha256dHash
impl<S: SimpleEncoder> ConsensusEncodable<S> for Sha256dHash
sourceimpl Debug for Sha256dHash
impl Debug for Sha256dHash
sourceimpl Default for Sha256dHash
impl Default for Sha256dHash
sourcefn default() -> Sha256dHash
fn default() -> Sha256dHash
Returns the “default value” for a type. Read more
sourceimpl Display for Sha256dHash
impl Display for Sha256dHash
sourceimpl<'a> From<&'a [u8]> for Sha256dHash
impl<'a> From<&'a [u8]> for Sha256dHash
sourcefn from(data: &'a [u8]) -> Sha256dHash
fn from(data: &'a [u8]) -> Sha256dHash
Converts to this type from the input type.
sourceimpl Hash for Sha256dHash
impl Hash for Sha256dHash
sourceimpl Index<Range<usize>> for Sha256dHash
impl Index<Range<usize>> for Sha256dHash
sourceimpl Index<RangeFrom<usize>> for Sha256dHash
impl Index<RangeFrom<usize>> for Sha256dHash
sourceimpl Index<RangeFull> for Sha256dHash
impl Index<RangeFull> for Sha256dHash
sourceimpl Index<RangeTo<usize>> for Sha256dHash
impl Index<RangeTo<usize>> for Sha256dHash
sourceimpl Index<usize> for Sha256dHash
impl Index<usize> for Sha256dHash
sourceimpl LowerHex for Sha256dHash
impl LowerHex for Sha256dHash
sourceimpl Ord for Sha256dHash
impl Ord for Sha256dHash
sourcefn cmp(&self, other: &Sha256dHash) -> Ordering
fn cmp(&self, other: &Sha256dHash) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Sha256dHash> for Sha256dHash
impl PartialEq<Sha256dHash> for Sha256dHash
sourcefn eq(&self, other: &Sha256dHash) -> bool
fn eq(&self, other: &Sha256dHash) -> bool
sourceimpl PartialOrd<Sha256dHash> for Sha256dHash
impl PartialOrd<Sha256dHash> for Sha256dHash
sourcefn partial_cmp(&self, other: &Sha256dHash) -> Option<Ordering>
fn partial_cmp(&self, other: &Sha256dHash) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl UpperHex for Sha256dHash
impl UpperHex for Sha256dHash
impl Copy for Sha256dHash
impl Eq for Sha256dHash
Auto Trait Implementations
impl RefUnwindSafe for Sha256dHash
impl Send for Sha256dHash
impl Sync for Sha256dHash
impl Unpin for Sha256dHash
impl UnwindSafe for Sha256dHash
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more