Trait Encode

Source
pub trait Encode {
    // Required method
    fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>;
}

Required Methods§

Source

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Trait Implementations§

Source§

impl Encode for Box<dyn Encode>

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Implementations on Foreign Types§

Source§

impl Encode for u8

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl Encode for u32

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl Encode for ()

Source§

fn encode(&self, _writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl Encode for Box<dyn Encode>

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl<A, B> Encode for (A, B)
where A: Encode, B: Encode,

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl<T> Encode for Option<T>
where T: Encode,

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl<T> Encode for &T
where T: Encode,

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Source§

impl<const LEN: usize> Encode for Array<u8, LEN>

Source§

fn encode(&self, writer: &mut dyn Write) -> Result<usize, IoError>

Implementors§

Source§

impl Encode for PsbtVer

Source§

impl Encode for Bip340Sig

Source§

impl Encode for CompressedPk

Source§

impl Encode for ControlBlock

Source§

impl Encode for InternalPk

Source§

impl Encode for KeyOrigin

Source§

impl Encode for LeafScript

Source§

impl Encode for LegacyPk

Source§

impl Encode for LegacySig

Source§

impl Encode for LockHeight

Source§

impl Encode for LockTime

Source§

impl Encode for LockTimestamp

Source§

impl Encode for Outpoint

Source§

impl Encode for RedeemScript

Source§

impl Encode for Sats

Source§

impl Encode for ScriptBytes

Source§

impl Encode for ScriptPubkey

Source§

impl Encode for SeqNo

Source§

impl Encode for SigScript

Source§

impl Encode for SighashType

Source§

impl Encode for TapDerivation

A compact size unsigned integer representing the number of leaf hashes, followed by a list of leaf hashes, followed by the 4 byte master key fingerprint concatenated with the derivation path of the public key. The derivation path is represented as 32-bit little endian unsigned integer indexes concatenated with each other.

Source§

impl Encode for TapLeafHash

Source§

impl Encode for TapNodeHash

Source§

impl Encode for TapTree

One or more tuples representing the depth, leaf version, and script for a leaf in the Taproot tree, allowing the entire tree to be reconstructed. The tuples must be in depth first search order so that the tree is correctly reconstructed. Each tuple is an 8-bit unsigned integer representing the depth in the Taproot tree for this script, an 8-bit unsigned integer representing the leaf version, the length of the script as a compact size unsigned integer, and the script itself.

Source§

impl Encode for Tx

Source§

impl Encode for TxOut

Source§

impl Encode for TxVer

Source§

impl Encode for Txid

Source§

impl Encode for UncompressedPk

Source§

impl Encode for UnsignedTx

Source§

impl Encode for UnsignedTxIn

Source§

impl Encode for VarInt

Source§

impl Encode for Vout

Source§

impl Encode for Witness

Source§

impl Encode for WitnessScript

Source§

impl Encode for XOnlyPk

Source§

impl Encode for XkeyOrigin

Source§

impl Encode for Xpub

Source§

impl Encode for XpubFp

Source§

impl Encode for ModifiableFlags

Source§

impl Encode for PropKey

Source§

impl<I> Encode for DerivationPath<I>
where I: Idx,

Source§

impl<T, K, V> Encode for KeyPair<T, K, V>
where T: KeyType, K: Encode, V: Encode,