pub struct FileBackend { /* private fields */ }Implementations§
Source§impl FileBackend
impl FileBackend
pub fn new( root: PathBuf, history: StoreHistory, settings: StorageStateSettings, ) -> FileBackend
pub fn with_journal_opener( root: PathBuf, history: StoreHistory, settings: StorageStateSettings, opener: impl Fn(&Path) -> Result<File, Error> + Send + Sync + 'static, ) -> FileBackend
Trait Implementations§
Source§impl StateBackend for FileBackend
impl StateBackend for FileBackend
fn history(&self) -> &StoreHistory
fn open( &self, ) -> Pin<Box<dyn Future<Output = Result<RecoveryPosition, Error>> + Send + '_>>
fn read_snapshot( &self, maximum: NonZero<usize>, ) -> Pin<Box<dyn Future<Output = Result<Option<RecoverySnapshot>, Error>> + Send + '_>>
fn write_snapshot<'a>( &'a self, snapshot: &'a RecoverySnapshot, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>
fn read_entries<'a>( &'a self, after: &'a RecoveryPosition, through: &'a RecoveryPosition, limits: ReadLimits, ) -> Pin<Box<dyn Future<Output = Result<RecoveryPage, Error>> + Send + 'a>>
fn write_entries<'a>( &'a self, entries: &'a [RecoveryEntry], ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'a>>
fn flush<'a>( &'a self, through: &'a RecoveryPosition, ) -> Pin<Box<dyn Future<Output = Result<RecoveryPosition, Error>> + Send + 'a>>
fn close(&self) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + '_>>
Auto Trait Implementations§
impl !RefUnwindSafe for FileBackend
impl !UnwindSafe for FileBackend
impl Freeze for FileBackend
impl Send for FileBackend
impl Sync for FileBackend
impl Unpin for FileBackend
impl UnsafeUnpin for FileBackend
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