Enum bitcoin::blockdata::transaction::SigHashType [−][src]
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]
impl SigHashType
pub fn from_u32(n: u32) -> SigHashType
[src]
pub fn from_u32(n: u32) -> SigHashType
Reads a 4-byte uint32 as a sighash type
pub fn as_u32(&self) -> u32
[src]
pub fn as_u32(&self) -> u32
Converts to a u32
Trait Implementations
impl PartialEq for SigHashType
[src]
impl PartialEq for SigHashType
fn eq(&self, other: &SigHashType) -> bool
[src]
fn eq(&self, other: &SigHashType) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Eq for SigHashType
[src]
impl Eq for SigHashType
impl Debug for SigHashType
[src]
impl Debug for SigHashType
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for SigHashType
[src]
impl Copy for SigHashType
impl Clone for SigHashType
[src]
impl Clone for SigHashType
fn clone(&self) -> SigHashType
[src]
fn clone(&self) -> SigHashType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for SigHashType
impl Send for SigHashType
impl Sync for SigHashType
impl Sync for SigHashType