Trait TxoSeal

Source
pub trait TxoSeal: From<Outpoint> {
    // Required methods
    fn method(&self) -> CloseMethod;
    fn txid(&self) -> Option<Txid>;
    fn vout(&self) -> Vout;
    fn outpoint(&self) -> Option<Outpoint>;
    fn txid_or(&self, default_txid: Txid) -> Txid;
    fn outpoint_or(&self, default_txid: Txid) -> Outpoint;
}
Expand description

Methods common for all transaction-output based seal types.

Required Methods§

Source

fn method(&self) -> CloseMethod

Returns method which must be used for seal closing.

Source

fn txid(&self) -> Option<Txid>

Returns Txid part of the seal definition, if known.

Source

fn vout(&self) -> Vout

Returns transaction output number containing the defined seal.

Source

fn outpoint(&self) -> Option<Outpoint>

Returns Outpoint defining the seal, if txid is known.

Source

fn txid_or(&self, default_txid: Txid) -> Txid

Returns Txid part of the seal definition, if known, or the provided default_txid.

Source

fn outpoint_or(&self, default_txid: Txid) -> Outpoint

Returns Outpoint defining the seal, if txid is known, or constructs one using the provided default_txid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Id> TxoSeal for BlindSeal<Id>
where Id: SealTxid,

Source§

impl<Id> TxoSeal for ExplicitSeal<Id>
where Id: SealTxid,