Trait breez_sdk_core::lightning::util::ser::Writeable

pub trait Writeable {
    // Required method
    fn write<W>(&self, writer: &mut W) -> Result<(), Error>
       where W: Writer;

    // 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§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

Writes self out to the given Writer.

Provided Methods§

fn encode(&self) -> Vec<u8>

Writes self out to a Vec<u8>.

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§

§

impl Writeable for Infallible

§

fn write<W>(&self, _: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Option<Vec<Option<(usize, Signature)>>>

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for bool

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for i8

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for i16

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for i32

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for i64

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for u8

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for u16

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for u32

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for u64

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for u128

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for ()

§

fn write<W>(&self, _: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for VecDeque<(Event, Option<EventCompletionAction>)>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for String

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<&BlindedTail>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<u8>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<Witness>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<Signature>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<ChannelMonitorUpdate>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Vec<MonitorUpdateCompletionAction>

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Duration

This is not exported to bindings users as Durations are simply mapped as ints.

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for DevPrivKey

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for DevSecret

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for DisclosedSecret

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for ExtKey

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for LoopbackChannelSigner

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for OnionRoutingPacket

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for PubKey

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for PubKey32

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for RecoverableSignature

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Sha256

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for Signature

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 3]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 4]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 12]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 16]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 32]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 33]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 64]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 66]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u8; 1300]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u16; 8]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl Writeable for [u16; 32]

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<'a, T> Writeable for &'a T
where T: Writeable,

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

§

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

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<A, B> Writeable for Vec<(A, B)>
where A: Writeable, B: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<A, B, C> Writeable for (A, B, C)
where A: Writeable, B: Writeable, C: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<A, B, C, D> Writeable for (A, B, C, D)
where A: Writeable, B: Writeable, C: Writeable, D: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

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

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<K, V> Writeable for HashMap<K, V>
where K: Writeable + Eq + Hash, V: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<T> Writeable for (Payload<T>, [u8; 32])

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

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

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

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

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<T> Writeable for HashSet<T>
where T: Writeable + Eq + Hash,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<T> Writeable for Mutex<T>
where T: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<T> Writeable for RwLock<T>
where T: Writeable,

§

fn write<W>(&self, w: &mut W) -> Result<(), Error>
where W: Writer,

§

impl<T> Writeable for SerBoltTlvWriteWrap<T>
where T: Encodable,

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

Implementors§

§

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 ChannelShutdownState

§

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 ChainHash

§

impl Writeable for BlockHash

§

impl Writeable for breez_sdk_core::bitcoin::OutPoint

§

impl Writeable for Script

§

impl Writeable for Transaction

§

impl Writeable for TxOut

§

impl Writeable for Txid

§

impl Writeable for Witness

§

impl Writeable for breez_sdk_core::bitcoin::util::key::secp256k1::ecdsa::Signature

§

impl Writeable for Hash

§

impl Writeable for breez_sdk_core::bitcoin::util::key::secp256k1::schnorr::Signature

§

impl Writeable for PublicKey

§

impl Writeable for SecretKey

§

impl Writeable for PaymentSecret

§

impl Writeable for RouteHint

§

impl Writeable for RouteHintHop

§

impl Writeable for RoutingFees

§

impl Writeable for ForwardTlvs

§

impl Writeable for PaymentConstraints

§

impl Writeable for PaymentRelay

§

impl Writeable for ReceiveTlvs

§

impl Writeable for BlindedHop

§

impl Writeable for BlindedPath

§

impl Writeable for ChannelMonitorUpdate

§

impl Writeable for HTLCUpdate

§

impl Writeable for ClaimId

§

impl Writeable for breez_sdk_core::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 ChannelCounterparty

§

impl Writeable for ChannelDetails

§

impl Writeable for CounterpartyForwardingInfo

§

impl Writeable for InterceptId

§

impl Writeable for PaymentId

§

impl Writeable for PhantomRouteHints

§

impl Writeable for RecipientOnionFields

§

impl Writeable for Features<BlindedHopContext>

§

impl Writeable for Features<Bolt11InvoiceContext>

§

impl Writeable for Features<Bolt12InvoiceContext>

§

impl Writeable for Features<ChannelContext>

§

impl Writeable for Features<ChannelTypeContext>

§

impl Writeable for Features<InitContext>

§

impl Writeable for Features<NodeContext>

§

impl Writeable for AcceptChannel

§

impl Writeable for AcceptChannelV2

§

impl Writeable for AnnouncementSignatures

§

impl Writeable for ChannelAnnouncement

§

impl Writeable for ChannelReady

§

impl Writeable for ChannelReestablish

§

impl Writeable for ChannelUpdate

§

impl Writeable for ClosingSigned

§

impl Writeable for ClosingSignedFeeRange

§

impl Writeable for CommitmentSigned

§

impl Writeable for ErrorMessage

§

impl Writeable for FundingCreated

§

impl Writeable for FundingSigned

§

impl Writeable for GossipTimestampFilter

§

impl Writeable for Init

§

impl Writeable for NodeAnnouncement

§

impl Writeable for OnionMessage

§

impl Writeable for OpenChannel

§

impl Writeable for OpenChannelV2

§

impl Writeable for Ping

§

impl Writeable for Pong

§

impl Writeable for QueryChannelRange

§

impl Writeable for QueryShortChannelIds

§

impl Writeable for ReplyChannelRange

§

impl Writeable for ReplyShortChannelIdsEnd

§

impl Writeable for RevokeAndACK

§

impl Writeable for Shutdown

§

impl Writeable for TxAbort

§

impl Writeable for TxAckRbf

§

impl Writeable for TxAddInput

§

impl Writeable for TxAddOutput

§

impl Writeable for TxComplete

§

impl Writeable for TxInitRbf

§

impl Writeable for TxRemoveInput

§

impl Writeable for TxRemoveOutput

§

impl Writeable for TxSignatures

§

impl Writeable for UnsignedChannelAnnouncement

§

impl Writeable for UnsignedChannelUpdate

§

impl Writeable for UnsignedNodeAnnouncement

§

impl Writeable for UpdateAddHTLC

§

impl Writeable for UpdateFailHTLC

§

impl Writeable for UpdateFailMalformedHTLC

§

impl Writeable for UpdateFee

§

impl Writeable for UpdateFulfillHTLC

§

impl Writeable for WarningMessage

§

impl Writeable for ShutdownScript

§

impl Writeable for ChannelId

§

impl Writeable for PaymentHash

§

impl Writeable for PaymentPreimage

§

impl Writeable for BlindedPayInfo

§

impl Writeable for Bolt12Invoice

§

impl Writeable for UnsignedBolt12Invoice

§

impl Writeable for InvoiceError

§

impl Writeable for InvoiceRequest

§

impl Writeable for UnsignedInvoiceRequest

§

impl Writeable for Offer

§

impl Writeable for Refund

§

impl Writeable for Packet

§

impl Writeable for ChannelInfo

§

impl Writeable for ChannelUpdateInfo

§

impl Writeable for NodeAlias

§

impl Writeable for NodeAnnouncementInfo

§

impl Writeable for NodeId

§

impl Writeable for NodeInfo

§

impl Writeable for BlindedTail

§

impl Writeable for InFlightHtlcs

§

impl Writeable for PaymentParameters

§

impl Writeable for Route

§

impl Writeable for RouteHop

§

impl Writeable for RouteParameters

§

impl Writeable for FixedPenaltyScorer

§

impl Writeable for ChannelDerivationParameters

§

impl Writeable for DelayedPaymentOutputDescriptor

§

impl Writeable for HTLCDescriptor

§

impl Writeable for InMemorySigner

§

impl Writeable for StaticPaymentOutputDescriptor

§

impl Writeable for ChannelConfig

§

impl Writeable for UntrustedString

§

impl Writeable for TestChannelSigner

§

impl Writeable for BigSize

§

impl Writeable for Hostname

§

impl Writeable for TransactionU16LenLimited

§

impl Writeable for WithoutLength<&Script>

§

impl Writeable for WithoutLength<&UntrustedString>

§

impl Writeable for WithoutLength<&String>

§

impl<'a> Writeable for UnsignedGossipMessage<'a>

§

impl<'a, T> Writeable for WithoutLength<&'a Vec<T>>
where T: Writeable,

§

impl<G, L, T> Writeable for ProbabilisticScorerUsingTime<G, L, T>
where G: Deref<Target = NetworkGraph<L>>, L: Deref, T: Time, <L as Deref>::Target: Logger,

§

impl<L> Writeable for NetworkGraph<L>
where L: Deref, <L as Deref>::Target: Logger,

§

impl<M, T, ES, NS, SP, F, R, L> Writeable for ChannelManager<M, T, ES, NS, SP, F, R, L>
where M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref, <M as Deref>::Target: Watch<<<SP as Deref>::Target as SignerProvider>::Signer>, <T as Deref>::Target: BroadcasterInterface, <ES as Deref>::Target: EntropySource, <NS as Deref>::Target: NodeSigner, <SP as Deref>::Target: SignerProvider, <F as Deref>::Target: FeeEstimator, <R as Deref>::Target: Router, <L as Deref>::Target: Logger,

§

impl<Signer> Writeable for ChannelMonitor<Signer>

§

impl<T> Writeable for ParsedOnionMessageContents<T>

§

impl<T> Writeable for WithoutLength<&Features<T>>
where T: Context,