pub trait Persister<'a, CM: Deref, L: Deref, S: Deref>where
CM::Target: 'static + AChannelManager,
L::Target: 'static + Logger,
S::Target: WriteableScore<'a>,{
// 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§
Sourcefn persist_manager(&self, channel_manager: &CM) -> Result<(), Error>
fn persist_manager(&self, channel_manager: &CM) -> Result<(), Error>
Persist the given [‘ChannelManager’] to disk, returning an error if persistence failed.
Sourcefn persist_graph(&self, network_graph: &NetworkGraph<L>) -> Result<(), Error>
fn persist_graph(&self, network_graph: &NetworkGraph<L>) -> Result<(), Error>
Persist the given NetworkGraph to disk, returning an error if persistence failed.
Sourcefn persist_scorer(&self, scorer: &S) -> Result<(), Error>
fn persist_scorer(&self, scorer: &S) -> Result<(), Error>
Persist the given WriteableScore to disk, returning an error if persistence failed.