pub struct Handle { /* private fields */ }
Expand description
Provides access to a storage directory. Manages manifest access, file cloning, file writers, configuration, value eviction etc.
Implementations§
Source§impl Handle
impl Handle
Sourcepub fn dir_supports_file_cloning(&self) -> bool
pub fn dir_supports_file_cloning(&self) -> bool
Whether file cloning should be attempted.
pub fn set_instance_limits(&mut self, limits: Limits) -> Result<()>
pub fn dir(&self) -> &Path
pub fn new(dir: PathBuf) -> Result<Self>
pub fn cleanup_snapshots(&self) -> PubResult<()>
pub fn block_size(&self) -> u64
pub fn new_writer(&self) -> Result<BatchWriter<&Handle>>
Sourcepub fn start_deferred_transaction_for_read(&self) -> Result<OwnedReadTx<'_>>
pub fn start_deferred_transaction_for_read(&self) -> Result<OwnedReadTx<'_>>
Starts a deferred transaction (the default). There is no guaranteed read-only transaction mode. There might be pragmas that can limit to read only statements.
pub fn read_single(&self, key: &[u8]) -> Result<Option<SnapshotValue<Value>>>
pub fn single_write_from( &self, key: Vec<u8>, r: impl Read, ) -> Result<(u64, WriteCommitResult)>
pub fn single_delete(&self, key: &[u8]) -> PubResult<Option<PossumStat>>
pub fn clone_from_file(&mut self, key: Vec<u8>, file: &mut File) -> Result<u64>
pub fn rename_item(&mut self, from: &[u8], to: &[u8]) -> PubResult<Timestamp>
Sourcepub fn walk_dir(&self) -> Result<Vec<Entry>>
pub fn walk_dir(&self) -> Result<Vec<Entry>>
Walks the underlying files in the possum directory.
pub fn list_items(&self, prefix: &[u8]) -> PubResult<Vec<Item>>
Sourcepub fn get_value_puncher_done(&self) -> ValuePuncherDone
pub fn get_value_puncher_done(&self) -> ValuePuncherDone
Returns something that can be used to test if the value puncher routine for this Handle has returned.
pub fn move_prefix(&self, from: &[u8], to: &[u8]) -> Result<()>
pub fn delete_prefix(&self, prefix: impl AsRef<[u8]>) -> PubResult<()>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Handle
impl !RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl !UnwindSafe for Handle
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