Struct clarity_repl::clarity::util::hash::Sha256Sum
pub struct Sha256Sum(pub [u8; 32]);
Tuple Fields§
§0: [u8; 32]
Implementations§
§impl Sha256Sum
impl Sha256Sum
pub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Converts the object to a mutable raw pointer
pub fn into_bytes(self) -> [u8; 32]
pub fn into_bytes(self) -> [u8; 32]
Returns the underlying bytes.
§impl Sha256Sum
impl Sha256Sum
pub fn from_bytes(inp: &[u8]) -> Option<Sha256Sum>
pub fn from_bytes(inp: &[u8]) -> Option<Sha256Sum>
Instantiates from a slice of bytes
pub fn from_bytes_be(inp: &[u8]) -> Option<Sha256Sum>
pub fn from_bytes_be(inp: &[u8]) -> Option<Sha256Sum>
Instantiates from a slice of bytes, converting to host byte order
pub fn from_vec_be(b: &Vec<u8>) -> Option<Sha256Sum>
pub fn from_vec_be(b: &Vec<u8>) -> Option<Sha256Sum>
Instantiates from a big-endian vector of bytes, converting to host byte order
Trait Implementations§
§impl<'de> Deserialize<'de> for Sha256Sum
impl<'de> Deserialize<'de> for Sha256Sum
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Sha256Sum, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Sha256Sum, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl MerkleHashFunc for Sha256Sum
impl MerkleHashFunc for Sha256Sum
§impl Ord for Sha256Sum
impl Ord for Sha256Sum
§impl PartialOrd for Sha256Sum
impl PartialOrd for Sha256Sum
§fn partial_cmp(&self, other: &Sha256Sum) -> Option<Ordering>
fn partial_cmp(&self, other: &Sha256Sum) -> Option<Ordering>
1.0.0 · source§fn 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 more§impl Serialize for Sha256Sum
impl Serialize for Sha256Sum
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Sha256Sum
impl Eq for Sha256Sum
Auto Trait Implementations§
impl RefUnwindSafe for Sha256Sum
impl Send for Sha256Sum
impl Sync for Sha256Sum
impl Unpin for Sha256Sum
impl UnwindSafe for Sha256Sum
Blanket Implementations§
§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> InitializableFromZeroed for Twhere
T: Default,
impl<T> InitializableFromZeroed for Twhere T: Default,
§unsafe fn initialize(place: *mut T)
unsafe fn initialize(place: *mut T)
Called to initialize a place to a valid value, after it is set
to all-bits-zero. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<S> SliceExt for Swhere
S: Index<RangeFull> + ?Sized,
impl<S> SliceExt for Swhere S: Index<RangeFull> + ?Sized,
§impl<T> ToBase32 for Twhere
T: AsRef<[u8]>,
impl<T> ToBase32 for Twhere T: AsRef<[u8]>,
§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.