Trait lightning_encoding::LightningDecode[][src]

pub trait LightningDecode where
    Self: Sized
{ fn lightning_decode<D: Read>(d: D) -> Result<Self, Error>; fn lightning_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error> { ... } }
Expand description

Lightning-network specific encoding as defined in BOLT-1, 2, 3…

Required methods

Decode with the given std::io::Read instance; must either construct an instance or return implementation-specific error type.

Provided methods

Tries to deserialize byte array into the current type using LightningDecode::lightning_decode function.

Implementations on Foreign Types

Two-component tuples are decoded as they were fields in the parent data structure

Implementors