pub struct StatusHash(/* private fields */);Expand description
https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#status
Implementations§
Source§impl StatusHash
impl StatusHash
Sourcepub fn from_raw_hash(inner: Hash) -> StatusHash
pub fn from_raw_hash(inner: Hash) -> StatusHash
Creates this wrapper type from the inner hash type.
Sourcepub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
Sourcepub fn as_raw_hash(&self) -> &Hash
pub fn as_raw_hash(&self) -> &Hash
Returns a reference to the inner hash (sha256, sh256d etc.).
Trait Implementations§
Source§impl AsRef<[u8]> for StatusHash
impl AsRef<[u8]> for StatusHash
Source§impl Borrow<[u8]> for StatusHash
impl Borrow<[u8]> for StatusHash
Source§impl Clone for StatusHash
impl Clone for StatusHash
Source§fn clone(&self) -> StatusHash
fn clone(&self) -> StatusHash
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 StatusHash
impl Debug for StatusHash
Source§impl<'de> Deserialize<'de> for StatusHash
impl<'de> Deserialize<'de> for StatusHash
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<StatusHash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<StatusHash, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for StatusHash
impl Display for StatusHash
Source§impl From<Hash> for StatusHash
impl From<Hash> for StatusHash
Source§fn from(inner: Hash) -> StatusHash
fn from(inner: Hash) -> StatusHash
Converts to this type from the input type.
Source§impl From<StatusHash> for Hash
impl From<StatusHash> for Hash
Source§fn from(hashtype: StatusHash) -> Hash
fn from(hashtype: StatusHash) -> Hash
Converts to this type from the input type.
Source§impl FromStr for StatusHash
impl FromStr for StatusHash
Source§impl Hash for StatusHash
impl Hash for StatusHash
Source§impl Hash for StatusHash
impl Hash for StatusHash
Source§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for
Sha256dHash, so here we are.Source§type Engine = <Hash as Hash>::Engine
type Engine = <Hash as Hash>::Engine
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write trait, and to never return errors under
any conditions.Source§fn from_engine(e: Self::Engine) -> Self
fn from_engine(e: Self::Engine) -> Self
Produces a hash from the current state of a given engine.
Source§fn from_slice(sl: &[u8]) -> Result<StatusHash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<StatusHash, FromSliceError>
Copies a byte slice into a hash object.
Source§fn from_byte_array(bytes: Self::Bytes) -> Self
fn from_byte_array(bytes: Self::Bytes) -> Self
Constructs a hash from the underlying byte array.
Source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
Returns the underlying byte array.
Source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
Returns a reference to the underlying byte array.
Source§fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
Hashes all the byte slices retrieved from the iterator together.
Source§impl<I: SliceIndex<[u8]>> Index<I> for StatusHash
impl<I: SliceIndex<[u8]>> Index<I> for StatusHash
Source§impl LowerHex for StatusHash
impl LowerHex for StatusHash
Source§impl Ord for StatusHash
impl Ord for StatusHash
Source§fn cmp(&self, other: &StatusHash) -> Ordering
fn cmp(&self, other: &StatusHash) -> 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 StatusHash
impl PartialEq for StatusHash
Source§impl PartialOrd for StatusHash
impl PartialOrd for StatusHash
Source§impl SerdeHash for StatusHash
impl SerdeHash for StatusHash
Source§fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
Source§fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Do serde serialization.
Source§fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Do serde deserialization.
Source§impl Serialize for StatusHash
impl Serialize for StatusHash
Source§impl UpperHex for StatusHash
impl UpperHex for StatusHash
impl Copy for StatusHash
impl Eq for StatusHash
impl StructuralPartialEq for StatusHash
Auto Trait Implementations§
impl Freeze for StatusHash
impl RefUnwindSafe for StatusHash
impl Send for StatusHash
impl Sync for StatusHash
impl Unpin for StatusHash
impl UnwindSafe for StatusHash
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