pub trait Decodable: Sized {
    // Required method
    fn consensus_decode<R: Read>(
        r: &mut R,
        _modules: &ModuleDecoderRegistry
    ) -> Result<Self, DecodeError>;

    // Provided method
    fn consensus_decode_hex(
        hex: &str,
        modules: &ModuleDecoderRegistry
    ) -> Result<Self, DecodeError> { ... }
}
Expand description

Data which can be encoded in a consensus-consistent way

Required Methods§

source

fn consensus_decode<R: Read>( r: &mut R, _modules: &ModuleDecoderRegistry ) -> Result<Self, DecodeError>

Decode an object with a well-defined format

Provided Methods§

source

fn consensus_decode_hex( hex: &str, modules: &ModuleDecoderRegistry ) -> Result<Self, DecodeError>

Decode an object from hex

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Decodable for Cow<'static, str>

source§

impl Decodable for Network

source§

impl Decodable for bool

source§

impl Decodable for u8

source§

impl Decodable for u16

source§

impl Decodable for u32

source§

impl Decodable for u64

source§

impl Decodable for ()

source§

impl Decodable for String

source§

impl Decodable for Duration

source§

impl Decodable for SystemTime

source§

impl Decodable for BlockHeader

source§

impl Decodable for Script

source§

impl Decodable for OutPoint

source§

impl Decodable for Transaction

source§

impl Decodable for BlockHash

source§

impl Decodable for Txid

source§

impl Decodable for Address

source§

impl Decodable for Amount

source§

impl Decodable for PartialMerkleTree

source§

impl Decodable for PartiallySignedTransaction

source§

impl Decodable for Hash

source§

impl Decodable for AggregatePublicKey

source§

impl Decodable for BlindedMessage

source§

impl Decodable for BlindedSignature

source§

impl Decodable for BlindedSignatureShare

source§

impl Decodable for BlindingKey

source§

impl Decodable for PublicKeyShare

source§

impl Decodable for Signature

source§

impl Decodable for Ciphertext

source§

impl Decodable for DecryptionShare

source§

impl Decodable for PublicKey

source§

impl Decodable for PublicKeySet

source§

impl Decodable for Bolt11Invoice

source§

impl Decodable for RoutingFees

source§

impl Decodable for PublicKey

source§

impl Decodable for SecretKey

source§

impl Decodable for Signature

source§

impl Decodable for Signature

source§

impl<K> Decodable for Descriptor<K>
where Self: FromStr, <Self as FromStr>::Err: ToString + Error + Send + Sync + 'static, K: MiniscriptKey,

source§

impl<K> Decodable for BTreeSet<K>
where K: Decodable + Ord,

source§

impl<K, V> Decodable for BTreeMap<K, V>
where K: Decodable + Ord, V: Decodable,

source§

impl<T1: Decodable, T2: Decodable> Decodable for (T1, T2)

source§

impl<T1: Decodable, T2: Decodable, T3: Decodable> Decodable for (T1, T2, T3)

source§

impl<T1: Decodable, T2: Decodable, T3: Decodable, T4: Decodable> Decodable for (T1, T2, T3, T4)

source§

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

source§

impl<T> Decodable for Box<T>
where T: Decodable,

source§

impl<T> Decodable for Vec<T>
where T: Decodable,

source§

impl<T, E> Decodable for Result<T, E>
where T: Decodable, E: Decodable,

source§

impl<T, const SIZE: usize> Decodable for [T; SIZE]
where T: Decodable + Debug + Default + Copy,

Implementors§

source§

impl Decodable for ConsensusItem

source§

impl Decodable for TransactionError

source§

impl Decodable for TransactionSignature

source§

impl Decodable for ApiVersionSet

source§

impl Decodable for InviteCode

source§

impl Decodable for ClientBackupKey

source§

impl Decodable for ClientBackupKeyPrefix

source§

impl Decodable for ClientBackupSnapshot

source§

impl Decodable for BitcoinRpcConfig

source§

impl Decodable for ClientConfig

source§

impl Decodable for ClientModuleConfig

source§

impl Decodable for FederationId

source§

impl Decodable for FederationIdPrefix

source§

impl Decodable for GlobalClientConfig

source§

impl Decodable for PeerUrl

source§

impl Decodable for ServerModuleConsensusConfig

source§

impl Decodable for BackupRequest

source§

impl Decodable for DynClientConfig

source§

impl Decodable for DynInput

source§

impl Decodable for DynInputError

source§

impl Decodable for DynModuleConsensusItem

source§

impl Decodable for DynOutput

source§

impl Decodable for DynOutputError

source§

impl Decodable for DynOutputOutcome

source§

impl Decodable for DynUnknown

source§

impl Decodable for KeyPair

source§

impl Decodable for ModuleKind

source§

impl Decodable for OperationId

source§

impl Decodable for DatabaseVersion

source§

impl Decodable for DatabaseVersionKey

source§

impl Decodable for ApiVersion

source§

impl Decodable for CoreConsensusVersion

source§

impl Decodable for ModuleConsensusVersion

source§

impl Decodable for AcceptedItem

source§

impl Decodable for SchnorrSignature

source§

impl Decodable for SessionOutcome

source§

impl Decodable for SignedSessionOutcome

source§

impl Decodable for fedimint_core::Amount

source§

impl Decodable for Feerate

source§

impl Decodable for fedimint_core::OutPoint

source§

impl Decodable for PeerId

source§

impl Decodable for TransactionId

source§

impl Decodable for fedimint_core::transaction::Transaction

source§

impl Decodable for TxOutProof

source§

impl Decodable for SafeUrl

source§

impl Decodable for BigSize

source§

impl<C> Decodable for Tiered<C>
where C: Decodable,

source§

impl<C> Decodable for TieredMulti<C>
where C: Decodable,

source§

impl<T> Decodable for DynRawFallback<T>
where T: Decodable + 'static,