pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
Sourcepub fn new(
data_dir: PathBuf,
db_file_name: Option<String>,
kv_table_name: Option<String>,
) -> Result<Self>
pub fn new( data_dir: PathBuf, db_file_name: Option<String>, kv_table_name: Option<String>, ) -> Result<Self>
Constructs a new SqliteStore.
If not already existing, a new SQLite database will be created in the given data_dir under the
given db_file_name (or the default to DEFAULT_SQLITE_DB_FILE_NAME if set to None).
Similarly, the given kv_table_name will be used or default to DEFAULT_KV_TABLE_NAME.
Sourcepub fn get_data_dir(&self) -> PathBuf
pub fn get_data_dir(&self) -> PathBuf
Returns the data directory.
Trait Implementations§
Source§impl KVStore for SqliteStore
impl KVStore for SqliteStore
Source§fn read(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
) -> Result<Vec<u8>>
fn read( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, ) -> Result<Vec<u8>>
Source§fn write(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
buf: &[u8],
) -> Result<()>
fn write( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: &[u8], ) -> Result<()>
Persists the given data under the given
key. Read moreAuto Trait Implementations§
impl Freeze for SqliteStore
impl RefUnwindSafe for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnwindSafe for SqliteStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<ChannelSigner, K> Persist<ChannelSigner> for K
impl<ChannelSigner, K> Persist<ChannelSigner> for K
Source§fn persist_new_channel(
&self,
funding_txo: OutPoint,
monitor: &ChannelMonitor<ChannelSigner>,
) -> ChannelMonitorUpdateStatus
fn persist_new_channel( &self, funding_txo: OutPoint, monitor: &ChannelMonitor<ChannelSigner>, ) -> ChannelMonitorUpdateStatus
Persist a new channel’s data in response to a
chain::Watch::watch_channel call. This is
called by ChannelManager for new channels, or may be called directly, e.g. on startup. Read moreSource§fn update_persisted_channel(
&self,
funding_txo: OutPoint,
_update: Option<&ChannelMonitorUpdate>,
monitor: &ChannelMonitor<ChannelSigner>,
) -> ChannelMonitorUpdateStatus
fn update_persisted_channel( &self, funding_txo: OutPoint, _update: Option<&ChannelMonitorUpdate>, monitor: &ChannelMonitor<ChannelSigner>, ) -> ChannelMonitorUpdateStatus
Update one channel’s data. The provided
ChannelMonitor has already applied the given
update. Read moreSource§fn archive_persisted_channel(&self, funding_txo: OutPoint)
fn archive_persisted_channel(&self, funding_txo: OutPoint)
Prevents the channel monitor from being loaded on startup. Read more
Source§impl<'a, A, CM, L, S> Persister<'a, CM, L, S> for A
impl<'a, A, CM, L, S> Persister<'a, CM, L, S> for A
Source§fn 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.
Source§fn 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.Source§fn 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.