Trait lightning::util::persist::Persister

source ·
pub trait Persister<'a, CM: Deref, L: Deref, S: WriteableScore<'a>>
where CM::Target: 'static + AChannelManager, L::Target: 'static + Logger,
{ // Required methods fn persist_manager(&self, channel_manager: &CM) -> 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§

source

fn persist_manager(&self, channel_manager: &CM) -> Result<(), Error>

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

source

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

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

source

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

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

Implementors§

source§

impl<'a, A: KVStore + ?Sized, CM: Deref, L: Deref, S: WriteableScore<'a>> Persister<'a, CM, L, S> for A
where CM::Target: 'static + AChannelManager, L::Target: 'static + Logger,