pub struct JsonStorage { /* private fields */ }Implementations§
Source§impl JsonStorage
impl JsonStorage
pub fn new(settings: JsonStorageSettings, history: StoreHistory) -> Self
pub fn into_backends(self, settings: StorageStateSettings) -> StorageBackends
Trait Implementations§
Source§impl StorageBackend for JsonStorage
impl StorageBackend for JsonStorage
fn history(&self) -> &StoreHistory
fn open(&self) -> StorageFuture<'_, StorageCursor>
fn cursor_saved(&self) -> StorageFuture<'_, StorageCursor>
fn close(&self) -> StorageFuture<'_, ()>
fn write_schemas( &self, batch: StorageBatch<StorageSchema>, ) -> StorageFuture<'_, StorageCursor>
fn write_objects( &self, batch: StorageBatch<ObjectEntry>, ) -> StorageFuture<'_, StorageCursor>
fn write_records( &self, batch: StorageBatch<StoredRecord>, ) -> StorageFuture<'_, StorageCursor>
fn write_stream( &self, batch: StorageBatch<StoredRow>, ) -> StorageFuture<'_, StorageCursor>
fn write_files( &self, batch: StorageBatch<FileReference>, ) -> StorageFuture<'_, StorageCursor>
fn open_snapshot<'a>( &'a self, at: &'a StorageCursor, memory: RetainedMemory, ) -> StorageFuture<'a, BackendSnapshot>
fn release_snapshot<'a>( &'a self, snapshot: &'a BackendSnapshot, ) -> StorageFuture<'a, ()>
fn read_schemas<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a SchemaSelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<StorageSchema>>
fn read_records<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a RecordSelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<StoredRecord>>
fn read_stream<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a StreamSelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<StoredRow>>
fn read_files<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a FileSelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<FileReference>>
fn read_objects<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a ObjectSelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<ObjectEntry>>
fn read_object<'a>( &'a self, snapshot: &'a BackendSnapshot, point: &'a ObjectPoint, memory: RetainedMemory, ) -> StorageFuture<'a, Option<ObjectEntry>>
fn read_file<'a>( &'a self, snapshot: &'a BackendSnapshot, file: &'a FileReference, offset: u64, maximum: NonZeroUsize, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<u8>>
fn release_object_history<'a>( &'a self, schema: &'a SchemaKey, item: &'a ObjectKey, through: &'a StorageCursor, ) -> StorageFuture<'a, ()>
fn prune_objects<'a>( &'a self, through: &'a StorageCursor, maximum: NonZeroUsize, retention: fn(&SchemaKey) -> Result<ObjectRetention>, ) -> StorageFuture<'a, bool>
fn create_file<'a>( &'a self, metadata: &'a FileMetadata, ) -> StorageFuture<'a, StagedFile>
fn write_file<'a>( &'a self, staging: &'a StagedFile, offset: u64, bytes: FileChunk, ) -> StorageFuture<'a, ()>
fn finish_file<'a>( &'a self, staging: &'a StagedFile, position: &'a StorageCursor, length: u64, sha256: [u8; 32], ) -> StorageFuture<'a, FileReference>
fn abort_file<'a>(&'a self, staging: &'a StagedFile) -> StorageFuture<'a, ()>
fn supports_file_sessions(&self) -> bool
fn create_production<'a>( &'a self, metadata: &'a FileMetadata, ) -> StorageFuture<'a, StagedFile>
fn fence_production<'a>( &'a self, file: &'a StagedFile, expected: u64, next: u64, ) -> StorageFuture<'a, ()>
fn save_production( &self, checkpoint: StorageBatch<FileCheckpoint>, ) -> StorageFuture<'_, ()>
fn recover_productions( &self, limits: ReadLimits, memory: RetainedMemory, ) -> StorageFuture<'_, Vec<FileCheckpoint>>
fn file_progress<'a>( &'a self, file: &'a StagedFile, memory: RetainedMemory, ) -> StorageFuture<'a, FileProgress>
fn read_production<'a>( &'a self, file: &'a StagedFile, offset: u64, maximum: NonZeroUsize, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<u8>>
fn abandon_file<'a>(&'a self, file: &'a StagedFile) -> StorageFuture<'a, ()>
fn supports_file_deletion(&self) -> bool
fn delete_file<'a>(&'a self, file: &'a StagedFile) -> StorageFuture<'a, ()>
fn supports_mutation_receipts(&self) -> bool
fn save_mutations( &self, receipts: StorageBatch<MutationReceipt>, ) -> StorageFuture<'_, ()>
fn recover_mutations( &self, limits: ReadLimits, memory: RetainedMemory, ) -> StorageFuture<'_, Vec<MutationReceipt>>
fn read_identities<'a>( &'a self, snapshot: &'a BackendSnapshot, selection: &'a IdentitySelection, page: ScanPage, memory: RetainedMemory, ) -> StorageFuture<'a, Vec<StoredIdentity>>
Auto Trait Implementations§
impl !RefUnwindSafe for JsonStorage
impl !UnwindSafe for JsonStorage
impl Freeze for JsonStorage
impl Send for JsonStorage
impl Sync for JsonStorage
impl Unpin for JsonStorage
impl UnsafeUnpin for JsonStorage
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