Trait breez_sdk_core::lightning::util::persist::Persister

pub trait Persister<'a, M, T, ES, NS, SP, F, R, L, S>
where M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref, S: WriteableScore<'a>, <M as Deref>::Target: 'static + Watch<<<SP as Deref>::Target as SignerProvider>::Signer>, <T as Deref>::Target: 'static + BroadcasterInterface, <ES as Deref>::Target: 'static + EntropySource, <NS as Deref>::Target: 'static + NodeSigner, <SP as Deref>::Target: 'static + SignerProvider, <F as Deref>::Target: 'static + FeeEstimator, <R as Deref>::Target: 'static + Router, <L as Deref>::Target: 'static + Logger,
{ // Required methods fn persist_manager( &self, channel_manager: &ChannelManager<M, T, ES, NS, SP, F, R, L>, ) -> Result<(), Error>; fn persist_graph( &self, network_graph: &NetworkGraph<L>, ) -> Result<(), Error>; fn persist_scorer(&self, scorer: &S) -> Result<(), Error>; }
Expand description

Trait that handles persisting a ChannelManager, NetworkGraph, and WriteableScore to disk.

Required Methods§

fn persist_manager( &self, channel_manager: &ChannelManager<M, T, ES, NS, SP, F, R, L>, ) -> Result<(), Error>

Persist the given [‘ChannelManager’] to disk, returning an error if persistence failed.

fn persist_graph(&self, network_graph: &NetworkGraph<L>) -> Result<(), Error>

Persist the given NetworkGraph to disk, returning an error if persistence failed.

fn persist_scorer(&self, scorer: &S) -> Result<(), Error>

Persist the given WriteableScore to disk, returning an error if persistence failed.

Implementors§

§

impl<'a, A, M, T, ES, NS, SP, F, R, L, S> Persister<'a, M, T, ES, NS, SP, F, R, L, S> for A
where A: KVStore, M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref, S: WriteableScore<'a>, <M as Deref>::Target: 'static + Watch<<<SP as Deref>::Target as SignerProvider>::Signer>, <T as Deref>::Target: 'static + BroadcasterInterface, <ES as Deref>::Target: 'static + EntropySource, <NS as Deref>::Target: 'static + NodeSigner, <SP as Deref>::Target: 'static + SignerProvider, <F as Deref>::Target: 'static + FeeEstimator, <R as Deref>::Target: 'static + Router, <L as Deref>::Target: 'static + Logger,