[][src]Enum bitcoin::blockdata::transaction::SigHashType

pub enum SigHashType {
    All,
    None,
    Single,
    AllPlusAnyoneCanPay,
    NonePlusAnyoneCanPay,
    SinglePlusAnyoneCanPay,
}

Hashtype of a transaction, encoded in the last byte of a signature Fixed values so they can be casted as integer types for encoding

Variants

All

0x1: Sign all outputs

None

0x2: Sign no outputs --- anyone can choose the destination

Single

0x3: Sign the output whose index matches this input's index. If none exists, sign the hash 0000000000000000000000000000000000000000000000000000000000000001. (This rule is probably an unintentional C++ism, but it's consensus so we have to follow it.)

AllPlusAnyoneCanPay

0x81: Sign all outputs but only this input

NonePlusAnyoneCanPay

0x82: Sign no outputs and only this input

SinglePlusAnyoneCanPay

0x83: Sign one output and only this input (see Single for what "one output" means)

Methods

impl SigHashType[src]

pub fn from_u32(n: u32) -> SigHashType[src]

Reads a 4-byte uint32 as a sighash type

pub fn as_u32(self) -> u32[src]

Converts to a u32

Trait Implementations

impl Serialize for SigHashType[src]

impl Deserialize for SigHashType[src]

impl From<SigHashType> for u32[src]

impl Clone for SigHashType[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<SigHashType> for SigHashType[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for SigHashType[src]

impl Copy for SigHashType[src]

impl Display for SigHashType[src]

impl Debug for SigHashType[src]

impl FromStr for SigHashType[src]

type Err = String

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Unpin for SigHashType

impl Sync for SigHashType

impl Send for SigHashType

impl UnwindSafe for SigHashType

impl RefUnwindSafe for SigHashType

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]