pub trait Persister<'a, CM: Deref, L: Deref, S: 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.