Struct bpstd::WScriptHash
source · pub struct WScriptHash(pub Array<u8, 32>);
Tuple Fields§
§0: Array<u8, 32>
Trait Implementations§
source§impl AsRef<[u8]> for WScriptHash
impl AsRef<[u8]> for WScriptHash
source§impl Borrow<[u8]> for WScriptHash
impl Borrow<[u8]> for WScriptHash
source§impl Clone for WScriptHash
impl Clone for WScriptHash
source§fn clone(&self) -> WScriptHash
fn clone(&self) -> WScriptHash
Returns a copy 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 WScriptHash
impl Debug for WScriptHash
source§impl Display for WScriptHash
impl Display for WScriptHash
source§impl From<&WitnessScript> for WScriptHash
impl From<&WitnessScript> for WScriptHash
source§fn from(witness_script: &WitnessScript) -> WScriptHash
fn from(witness_script: &WitnessScript) -> WScriptHash
Converts to this type from the input type.
source§impl From<WScriptHash> for AddressPayload
impl From<WScriptHash> for AddressPayload
source§fn from(v: WScriptHash) -> Self
fn from(v: WScriptHash) -> Self
Converts to this type from the input type.
source§impl FromHex for WScriptHash
impl FromHex for WScriptHash
source§fn from_byte_iter<I>(iter: I) -> Result<WScriptHash, Error>where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_byte_iter<I>(iter: I) -> Result<WScriptHash, Error>where I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
Produce an object from a byte iterator
source§impl FromStr for WScriptHash
impl FromStr for WScriptHash
source§impl Hash for WScriptHash
impl Hash for WScriptHash
source§impl Index<RangeFull> for WScriptHash
impl Index<RangeFull> for WScriptHash
source§impl Index<RangeInclusive<usize>> for WScriptHash
impl Index<RangeInclusive<usize>> for WScriptHash
§type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
The returned type after indexing.
source§fn index(
&self,
index: RangeInclusive<usize>
) -> &<WScriptHash as Index<RangeInclusive<usize>>>::Output
fn index( &self, index: RangeInclusive<usize> ) -> &<WScriptHash as Index<RangeInclusive<usize>>>::Output
Performs the indexing (
container[index]
) operation. Read moresource§impl Index<RangeToInclusive<usize>> for WScriptHash
impl Index<RangeToInclusive<usize>> for WScriptHash
§type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
type Output = <Array<u8, 32> as Index<RangeInclusive<usize>>>::Output
The returned type after indexing.
source§fn index(
&self,
index: RangeToInclusive<usize>
) -> &<WScriptHash as Index<RangeToInclusive<usize>>>::Output
fn index( &self, index: RangeToInclusive<usize> ) -> &<WScriptHash as Index<RangeToInclusive<usize>>>::Output
Performs the indexing (
container[index]
) operation. Read moresource§impl Index<usize> for WScriptHash
impl Index<usize> for WScriptHash
source§impl LowerHex for WScriptHash
impl LowerHex for WScriptHash
source§impl Ord for WScriptHash
impl Ord for WScriptHash
source§fn cmp(&self, other: &WScriptHash) -> Ordering
fn cmp(&self, other: &WScriptHash) -> 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 WScriptHash
impl PartialEq for WScriptHash
source§fn eq(&self, other: &WScriptHash) -> bool
fn eq(&self, other: &WScriptHash) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for WScriptHash
impl PartialOrd for WScriptHash
source§fn partial_cmp(&self, other: &WScriptHash) -> Option<Ordering>
fn partial_cmp(&self, other: &WScriptHash) -> 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 moresource§impl StrictDecode for WScriptHash
impl StrictDecode for WScriptHash
fn strict_decode( reader: &mut impl TypedRead ) -> Result<WScriptHash, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDumb for WScriptHash
impl StrictDumb for WScriptHash
fn strict_dumb() -> WScriptHash
source§impl StrictEncode for WScriptHash
impl StrictEncode for WScriptHash
source§impl StrictTuple for WScriptHash
impl StrictTuple for WScriptHash
source§impl StrictType for WScriptHash
impl StrictType for WScriptHash
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
source§impl UpperHex for WScriptHash
impl UpperHex for WScriptHash
source§impl Wrapper for WScriptHash
impl Wrapper for WScriptHash
source§fn from_inner(inner: <WScriptHash as Wrapper>::Inner) -> WScriptHash
fn from_inner(inner: <WScriptHash as Wrapper>::Inner) -> WScriptHash
Instantiates wrapper type with the inner data
source§fn as_inner(&self) -> &<WScriptHash as Wrapper>::Inner
fn as_inner(&self) -> &<WScriptHash as Wrapper>::Inner
Returns reference to the inner representation for the wrapper type
source§fn into_inner(self) -> <WScriptHash as Wrapper>::Inner
fn into_inner(self) -> <WScriptHash as Wrapper>::Inner
Unwraps the wrapper returning the inner type
impl Copy for WScriptHash
impl Eq for WScriptHash
impl StrictProduct for WScriptHash
impl StructuralEq for WScriptHash
impl StructuralPartialEq for WScriptHash
Auto Trait Implementations§
impl RefUnwindSafe for WScriptHash
impl Send for WScriptHash
impl Sync for WScriptHash
impl Unpin for WScriptHash
impl UnwindSafe for WScriptHash
Blanket Implementations§
source§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
source§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<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Idwhere
Id: Wrapper<Inner = Array<u8, LEN, REVERSE_STR>>,
impl<Id, const LEN: usize, const REVERSE_STR: bool> ByteArray<LEN> for Idwhere Id: Wrapper<Inner = Array<u8, LEN, REVERSE_STR>>,
source§fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
fn from_byte_array(val: impl Into<[u8; LEN]>) -> Id
Constructs a wrapper type around a byte array.
source§fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
fn from_slice(slice: impl AsRef<[u8]>) -> Result<Id, FromSliceError>
Constructs a byte array from the slice. Errors if the slice length
doesn’t match
LEN
constant generic.source§fn from_slice_unsafe(slice: impl AsRef<[u8]>) -> Id
fn from_slice_unsafe(slice: impl AsRef<[u8]>) -> Id
Constructs a byte array from the slice. Expects the slice length
doesn’t match
LEN
constant generic. Read moresource§fn to_byte_array(&self) -> [u8; LEN]
fn to_byte_array(&self) -> [u8; LEN]
Returns a byte array representation stored in the wrapped type.
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§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<Id, const LEN: usize, const REVERSE_STR: bool> RawArray<LEN> for Idwhere
Id: Wrapper<Inner = Array<u8, LEN, REVERSE_STR>>,
impl<Id, const LEN: usize, const REVERSE_STR: bool> RawArray<LEN> for Idwhere Id: Wrapper<Inner = Array<u8, LEN, REVERSE_STR>>,
source§impl<T> ToBase32 for Twhere
T: AsRef<[u8]>,
impl<T> ToBase32 for Twhere T: AsRef<[u8]>,
source§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.