[][src]Enum lnpbp::short_id::Descriptor

pub enum Descriptor {
    OnchainBlock {
        block_height: u32,
        block_checksum: BlockChecksum,
    },
    OnchainTransaction {
        block_height: u32,
        block_checksum: BlockChecksum,
        tx_index: u16,
    },
    OnchainTxInput {
        block_height: u32,
        block_checksum: BlockChecksum,
        tx_index: u16,
        input_index: u16,
    },
    OnchainTxOutput {
        block_height: u32,
        block_checksum: BlockChecksum,
        tx_index: u16,
        output_index: u16,
    },
    OffchainTransaction {
        tx_checksum: TxChecksum,
    },
    OffchainTxInput {
        tx_checksum: TxChecksum,
        input_index: u16,
    },
    OffchainTxOutput {
        tx_checksum: TxChecksum,
        output_index: u16,
    },
}

Variants

OnchainBlock

Fields of OnchainBlock

block_height: u32block_checksum: BlockChecksum
OnchainTransaction

Fields of OnchainTransaction

block_height: u32block_checksum: BlockChecksumtx_index: u16
OnchainTxInput

Fields of OnchainTxInput

block_height: u32block_checksum: BlockChecksumtx_index: u16input_index: u16
OnchainTxOutput

Fields of OnchainTxOutput

block_height: u32block_checksum: BlockChecksumtx_index: u16output_index: u16
OffchainTransaction

Fields of OffchainTransaction

tx_checksum: TxChecksum
OffchainTxInput

Fields of OffchainTxInput

tx_checksum: TxChecksuminput_index: u16
OffchainTxOutput

Fields of OffchainTxOutput

tx_checksum: TxChecksumoutput_index: u16

Implementations

impl Descriptor[src]

pub fn try_validity(&self) -> Result<(), Error>[src]

pub fn is_onchain(&self) -> bool[src]

pub fn is_offchain(&self) -> bool[src]

pub fn upgraded(
    &self,
    index: u16,
    dimension: Option<Dimension>
) -> Result<Self, Error>
[src]

pub fn downgraded(self) -> Result<Self, Error>[src]

pub fn get_block_height(&self) -> Option<u32>[src]

pub fn get_block_checksum(&self) -> Option<u8>[src]

pub fn get_tx_checksum(&self) -> Option<u64>[src]

pub fn get_tx_index(&self) -> Option<u16>[src]

pub fn get_input_index(&self) -> Option<u16>[src]

pub fn get_output_index(&self) -> Option<u16>[src]

pub fn try_into_u64(self) -> Result<u64, Error>[src]

Trait Implementations

impl Clone for Descriptor[src]

impl Copy for Descriptor[src]

impl Debug for Descriptor[src]

impl Default for Descriptor[src]

impl Display for Descriptor[src]

impl From<ShortId> for Descriptor[src]

impl TryFrom<Descriptor> for ShortId[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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.