[−]Struct bitcoin::hash_types::ScriptHash
A hash of Bitcoin Script bytecode.
Methods
impl ScriptHash
pub fn from_hash(inner: Hash) -> ScriptHash
Create this type from the inner hash type.
pub fn as_hash(&self) -> Hash
Convert this type into the inner hash type.
Trait Implementations
impl From<Hash> for ScriptHash
fn from(inner: Hash) -> ScriptHash
impl From<ScriptHash> for Hash
fn from(hashtype: ScriptHash) -> Hash
impl AsRef<[u8]> for ScriptHash
impl Ord for ScriptHash
fn cmp(&self, other: &ScriptHash) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<ScriptHash> for ScriptHash
fn partial_cmp(&self, other: &ScriptHash) -> Option<Ordering>
fn lt(&self, other: &ScriptHash) -> bool
fn le(&self, other: &ScriptHash) -> bool
fn gt(&self, other: &ScriptHash) -> bool
fn ge(&self, other: &ScriptHash) -> bool
impl Default for ScriptHash
fn default() -> ScriptHash
impl Clone for ScriptHash
fn clone(&self) -> ScriptHash
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<ScriptHash> for ScriptHash
fn eq(&self, other: &ScriptHash) -> bool
fn ne(&self, other: &ScriptHash) -> bool
impl Eq for ScriptHash
impl Copy for ScriptHash
impl Display for ScriptHash
impl Debug for ScriptHash
impl Deref for ScriptHash
impl Index<usize> for ScriptHash
impl Index<Range<usize>> for ScriptHash
impl Index<RangeFrom<usize>> for ScriptHash
type Output = [u8]
The returned type after indexing.
fn index(&self, index: RangeFrom<usize>) -> &[u8]
impl Index<RangeTo<usize>> for ScriptHash
impl Index<RangeFull> for ScriptHash
impl Hash for ScriptHash
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl FromStr for ScriptHash
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<ScriptHash, Self::Err>
impl LowerHex for ScriptHash
impl Borrow<[u8]> for ScriptHash
impl Hash for ScriptHash
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. Read more
type Inner = <Hash as Hash>::Inner
The byte array that represents the hash internally
const LEN: usize
const DISPLAY_BACKWARD: bool
fn engine() -> Self::Engine
fn from_engine(e: Self::Engine) -> Self
fn from_slice(sl: &[u8]) -> Result<ScriptHash, Error>
fn from_inner(inner: Self::Inner) -> Self
fn into_inner(self) -> Self::Inner
fn as_inner(&self) -> &Self::Inner
fn hash(data: &[u8]) -> Self
[src]
Hashes some bytes
Auto Trait Implementations
impl Unpin for ScriptHash
impl Sync for ScriptHash
impl Send for ScriptHash
impl UnwindSafe for ScriptHash
impl RefUnwindSafe for ScriptHash
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> ToHex for T where
T: LowerHex,
[src]
T: LowerHex,
impl<T> FromHex for T where
T: Hash,
[src]
T: Hash,
fn from_byte_iter<I>(iter: I) -> Result<T, Error> where
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
[src]
I: Iterator<Item = Result<u8, Error>> + ExactSizeIterator + DoubleEndedIterator,
fn from_hex(s: &str) -> Result<Self, Error>
[src]
Produce an object from a hex string
impl<T> ToBase32 for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err> where
W: WriteBase32,
[src]
W: WriteBase32,
fn to_base32(&self) -> Vec<u5>
[src]
Convert Self
to base32 vector
impl<T> Base32Len for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
fn base32_len(&self) -> usize
[src]
impl<'f, T> CheckBase32<Vec<u5>> for T where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,