pub struct FilesystemStore { /* private fields */ }Expand description
A KVStore and KVStoreSync implementation that writes to and reads from the file system.
Implementations§
Source§impl FilesystemStore
impl FilesystemStore
Sourcepub fn new(data_dir: PathBuf) -> Self
pub fn new(data_dir: PathBuf) -> Self
Constructs a new FilesystemStore.
Sourcepub fn get_data_dir(&self) -> PathBuf
pub fn get_data_dir(&self) -> PathBuf
Returns the data directory.
Trait Implementations§
Source§impl KVStore for FilesystemStore
Available on crate feature tokio only.
impl KVStore for FilesystemStore
Available on crate feature
tokio only.Source§fn read(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'static>>
fn read( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'static>>
Source§fn write(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
buf: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'static>>
fn write( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'static>>
Persists the given data under the given
key. Read moreSource§impl KVStoreSync for FilesystemStore
impl KVStoreSync for FilesystemStore
Source§fn read(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
) -> Result<Vec<u8>, Error>
fn read( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, ) -> Result<Vec<u8>, Error>
Source§fn write(
&self,
primary_namespace: &str,
secondary_namespace: &str,
key: &str,
buf: Vec<u8>,
) -> Result<(), Error>
fn write( &self, primary_namespace: &str, secondary_namespace: &str, key: &str, buf: Vec<u8>, ) -> Result<(), Error>
Persists the given data under the given
key. Read moreSource§impl MigratableKVStore for FilesystemStore
impl MigratableKVStore for FilesystemStore
Auto Trait Implementations§
impl !Freeze for FilesystemStore
impl RefUnwindSafe for FilesystemStore
impl Send for FilesystemStore
impl Sync for FilesystemStore
impl Unpin for FilesystemStore
impl UnwindSafe for FilesystemStore
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<ChannelSigner, K> Persist<ChannelSigner> for K
impl<ChannelSigner, K> Persist<ChannelSigner> for K
Source§fn persist_new_channel(
&self,
monitor_name: MonitorName,
monitor: &ChannelMonitor<ChannelSigner>,
) -> ChannelMonitorUpdateStatus
fn persist_new_channel( &self, monitor_name: MonitorName, 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,
with the monitor_name returned by ChannelMonitor::persistence_key. Read moreSource§fn update_persisted_channel(
&self,
monitor_name: MonitorName,
_update: Option<&ChannelMonitorUpdate>,
monitor: &ChannelMonitor<ChannelSigner>,
) -> ChannelMonitorUpdateStatus
fn update_persisted_channel( &self, monitor_name: MonitorName, _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, monitor_name: MonitorName)
fn archive_persisted_channel(&self, monitor_name: MonitorName)
Prevents the channel monitor from being loaded on startup. Read more