Enum wownero::blockdata::transaction::TxOutTarget
source · [−]pub enum TxOutTarget {
ToScript {
keys: Vec<PublicKey>,
script: Vec<u8>,
},
ToKey {
key: PublicKey,
},
ToScriptHash {
hash: Hash,
},
}
Expand description
Type of output formats, only TxOutTarget::ToKey
is used, other formats are legacy to the
original cryptonote implementation.
Variants
ToScript
A script output, not used.
ToKey
Fields
key: PublicKey
The one-time public key of that output.
A one-time public key output.
ToScriptHash
Fields
hash: Hash
The script hash
A script hash output, not used.
Implementations
sourceimpl TxOutTarget
impl TxOutTarget
sourcepub fn get_pubkeys(&self) -> Option<Vec<PublicKey>>
pub fn get_pubkeys(&self) -> Option<Vec<PublicKey>>
Retrieve the public keys, if any.
sourcepub fn as_one_time_key(&self) -> Option<&PublicKey>
pub fn as_one_time_key(&self) -> Option<&PublicKey>
Returns the one-time public key if this is a TxOutTarget::ToKey
and None
otherwise.
Trait Implementations
sourceimpl Clone for TxOutTarget
impl Clone for TxOutTarget
sourcefn clone(&self) -> TxOutTarget
fn clone(&self) -> TxOutTarget
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TxOutTarget
impl Debug for TxOutTarget
sourceimpl Decodable for TxOutTarget
impl Decodable for TxOutTarget
sourcefn consensus_decode<D: Read>(d: &mut D) -> Result<TxOutTarget, Error>
fn consensus_decode<D: Read>(d: &mut D) -> Result<TxOutTarget, Error>
Decode an object with a well-defined format.
sourceimpl<'de> Deserialize<'de> for TxOutTarget
impl<'de> Deserialize<'de> for TxOutTarget
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Encodable for TxOutTarget
impl Encodable for TxOutTarget
sourceimpl PartialEq<TxOutTarget> for TxOutTarget
impl PartialEq<TxOutTarget> for TxOutTarget
sourcefn eq(&self, other: &TxOutTarget) -> bool
fn eq(&self, other: &TxOutTarget) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &TxOutTarget) -> bool
fn ne(&self, other: &TxOutTarget) -> bool
This method tests for !=
.
sourceimpl Serialize for TxOutTarget
impl Serialize for TxOutTarget
impl StructuralPartialEq for TxOutTarget
Auto Trait Implementations
impl RefUnwindSafe for TxOutTarget
impl Send for TxOutTarget
impl Sync for TxOutTarget
impl Unpin for TxOutTarget
impl UnwindSafe for TxOutTarget
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more