Trait lnp::extension::Extension[][src]

pub trait Extension {
    type Identity: Nomenclature;
    fn identity(&self) -> Self::Identity;
fn update_from_peer(&mut self, data: &Messages) -> Result<(), Error>;
fn extension_state(&self) -> Box<dyn State>; }

Associated Types

Loading content...

Required methods

fn identity(&self) -> Self::Identity[src]

fn update_from_peer(&mut self, data: &Messages) -> Result<(), Error>[src]

Updates extension state from the data taken from the message received from the remote peer

fn extension_state(&self) -> Box<dyn State>[src]

Returns extension state for persistence & backups

These are extension configuration data, like the data that are the part of the channel parameters negotiatied between peeers or preconfigured parameters from the configuration file

Loading content...

Implementors

impl Extension for Bip96[src]

type Identity = ExtensionId

impl Extension for Bolt3[src]

type Identity = ExtensionId

impl Extension for Htlc[src]

type Identity = ExtensionId

impl<N> Extension for Channel<N> where
    N: 'static + Nomenclature
[src]

Channel is the extension to itself :) so it receives the same input as any other extension and just forwards it to them

type Identity = N

Loading content...