pub trait Writeable {
// Required method
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>;
// Provided methods
fn encode(&self) -> Vec<u8> ⓘ { ... }
fn serialized_length(&self) -> usize { ... }
}
Expand description
A trait that various LDK types implement allowing them to be written out to a Writer
.
This is not exported to bindings users as we only export serialization to/from byte arrays instead
Required Methods§
Provided Methods§
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl Writeable for Infallible
impl Writeable for Infallible
source§impl Writeable for Vec<&UpdateAddHTLC>
impl Writeable for Vec<&UpdateAddHTLC>
source§impl Writeable for Vec<&BlindedTail>
impl Writeable for Vec<&BlindedTail>
source§impl Writeable for Vec<SocketAddress>
impl Writeable for Vec<SocketAddress>
source§impl Writeable for Vec<ChannelMonitorUpdate>
impl Writeable for Vec<ChannelMonitorUpdate>
source§impl Writeable for Vec<UpdateAddHTLC>
impl Writeable for Vec<UpdateAddHTLC>
source§impl Writeable for Duration
impl Writeable for Duration
This is not exported to bindings users as Duration
s are simply mapped as ints.
source§impl Writeable for Transaction
impl Writeable for Transaction
Implementors§
impl Writeable for PaymentContext
impl Writeable for MonitorEvent
impl Writeable for ClosureReason
impl Writeable for Event
impl Writeable for HTLCDestination
impl Writeable for PathFailure
impl Writeable for PaymentFailureReason
impl Writeable for PaymentPurpose
impl Writeable for BlindedFailure
impl Writeable for ChannelShutdownState
impl Writeable for InboundHTLCStateDetails
Available on non-
fuzzing
only.impl Writeable for OutboundHTLCStateDetails
Available on non-
fuzzing
only.impl Writeable for PendingHTLCRouting
impl Writeable for Retry
impl Writeable for SocketAddress
impl Writeable for OffersMessage
impl Writeable for NetworkUpdate
impl Writeable for SpendableOutputDescriptor
impl Writeable for MaxDustHTLCExposure
impl Writeable for APIError
impl Writeable for OutputSpendStatus
impl Writeable for Bolt12OfferContext
impl Writeable for Bolt12RefundContext
impl Writeable for ForwardTlvs
impl Writeable for PaymentConstraints
impl Writeable for PaymentRelay
impl Writeable for ReceiveTlvs
impl Writeable for UnknownPaymentContext
impl Writeable for BlindedHop
impl Writeable for BlindedPath
impl Writeable for ChannelMonitorUpdate
impl Writeable for HTLCUpdate
impl Writeable for BestBlock
impl Writeable for ClaimId
impl Writeable for lightning::chain::transaction::OutPoint
impl Writeable for ClaimedHTLC
impl Writeable for BuiltCommitmentTransaction
impl Writeable for ChannelPublicKeys
impl Writeable for ChannelTransactionParameters
impl Writeable for CommitmentTransaction
impl Writeable for CounterpartyChannelTransactionParameters
impl Writeable for CounterpartyCommitmentSecrets
impl Writeable for HTLCOutputInCommitment
impl Writeable for HolderCommitmentTransaction
impl Writeable for TxCreationKeys
impl Writeable for DelayedPaymentBasepoint
impl Writeable for DelayedPaymentKey
impl Writeable for HtlcBasepoint
impl Writeable for HtlcKey
impl Writeable for RevocationBasepoint
impl Writeable for RevocationKey
impl Writeable for BlindedForward
impl Writeable for ChannelCounterparty
impl Writeable for ChannelDetails
impl Writeable for CounterpartyForwardingInfo
impl Writeable for InboundHTLCDetails
Available on non-
fuzzing
only.impl Writeable for InterceptId
impl Writeable for OutboundHTLCDetails
Available on non-
fuzzing
only.