pub struct SharedStore(pub Arc<dyn ObjectStore>);Tuple Fields§
§0: Arc<dyn ObjectStore>Trait Implementations§
Source§fn clone(&self) -> SharedStore
fn clone(&self) -> SharedStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read morefn get_blob(&self, hash: &ContentHash) -> Result<Option<Blob>>
fn put_blob(&self, blob: &Blob) -> Result<ContentHash>
fn put_blob_with_hash( &self, blob: &Blob, hash: ContentHash, ) -> Result<ContentHash>
fn has_blob(&self, hash: &ContentHash) -> Result<bool>
Source§fn blob_size(&self, hash: &ContentHash) -> Result<Option<u64>>
fn blob_size(&self, hash: &ContentHash) -> Result<Option<u64>>
Return the uncompressed byte length of the blob identified by
hash, or Ok(None) when the blob is not in the store. Read moreSource§fn loose_blob_path(&self, hash: &ContentHash) -> Option<PathBuf>
fn loose_blob_path(&self, hash: &ContentHash) -> Option<PathBuf>
Filesystem path of the loose blob whose on-disk bytes are
byte-identical to the blob’s uncompressed content, suitable
for
hard_link/clonefile materialization without going
through get_blob. Read moreSource§fn promote_to_loose_uncompressed(&self, hash: &ContentHash) -> Result<bool>
fn promote_to_loose_uncompressed(&self, hash: &ContentHash) -> Result<bool>
Ensure the blob identified by
hash is materialized as an
uncompressed loose file at the canonical loose path so that
loose_blob_path returns Some(path) on a subsequent call. Read morefn get_tree(&self, hash: &ContentHash) -> Result<Option<Tree>>
fn put_tree(&self, tree: &Tree) -> Result<ContentHash>
fn has_tree(&self, hash: &ContentHash) -> Result<bool>
fn get_state(&self, id: &ChangeId) -> Result<Option<State>>
fn put_state(&self, state: &State) -> Result<()>
fn has_state(&self, id: &ChangeId) -> Result<bool>
fn list_states(&self) -> Result<Vec<ChangeId>>
fn get_action(&self, id: &ActionId) -> Result<Option<Action>>
fn put_action(&self, action: &mut Action) -> Result<ActionId>
fn list_actions(&self) -> Result<Vec<ActionId>>
fn list_blobs(&self) -> Result<Vec<ContentHash>>
fn list_trees(&self) -> Result<Vec<ContentHash>>
fn get_pack_object( &self, id: &PackObjectId, ) -> Result<Option<(ObjectType, Vec<u8>)>>
fn install_pack( &self, pack_data: &[u8], index_data: &[u8], ) -> Result<Vec<PackObjectId>>
Source§fn install_pack_streaming(
&self,
pack_path: &Path,
index_path: &Path,
) -> Result<()>
fn install_pack_streaming( &self, pack_path: &Path, index_path: &Path, ) -> Result<()>
Install a pack and its index from on-disk files
(typically produced by
StreamingPackBuilder). The default
impl reads both files fully and delegates to install_pack,
so any backend that doesn’t override this still works (at the
cost of giving back the bounded-memory promise). Real fs-
backed stores override this to rename(2) both files into the
pack directory without ever loading them. Read moreSource§fn put_blobs_packed(&self, blobs: Vec<(ContentHash, Vec<u8>)>) -> Result<()>
fn put_blobs_packed(&self, blobs: Vec<(ContentHash, Vec<u8>)>) -> Result<()>
Bulk-write a batch of blobs as a single durable unit. The default
implementation falls back to per-blob writes; backends that
support packfiles (i.e.
FsStore) override this to install one
packfile + index — two fsyncs total instead of N. Used by the
snapshot hot path so writing 1000 small files takes ~one fsync,
not 1000. Read morefn begin_snapshot_write_batch(&self) -> Result<()>
fn flush_snapshot_write_batch(&self) -> Result<()>
fn abort_snapshot_write_batch(&self)
fn put_blob_bytes_with_hash( &self, data: &[u8], hash: ContentHash, ) -> Result<ContentHash>
fn put_tree_serialized( &self, data: &[u8], hash: ContentHash, ) -> Result<ContentHash>
fn put_state_serialized(&self, data: &[u8], id: ChangeId) -> Result<()>
fn put_action_serialized(&self, data: &[u8], id: ActionId) -> Result<()>
fn pack_objects(&self, aggressive: bool) -> Result<(u64, u64)>
fn prune_loose_objects(&self) -> Result<(u64, u64)>
Auto Trait Implementations§
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