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