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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl Writeable for BlindedHopFeatures
impl Writeable for BlindedHopFeatures
Source§impl Writeable for Bolt11InvoiceFeatures
impl Writeable for Bolt11InvoiceFeatures
Source§impl Writeable for Bolt12InvoiceFeatures
impl Writeable for Bolt12InvoiceFeatures
Source§impl Writeable for ChannelFeatures
impl Writeable for ChannelFeatures
Source§impl Writeable for ChannelTypeFeatures
impl Writeable for ChannelTypeFeatures
Source§impl Writeable for Duration
This is not exported to bindings users as Durations are simply mapped as ints.
impl Writeable for Duration
This is not exported to bindings users as Durations are simply mapped as ints.