pub struct SqlitePack { /* private fields */ }Implementations§
Source§impl SqlitePack
impl SqlitePack
pub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open_with_journal( path: impl AsRef<Path>, journal_mode: SqlitePackJournalMode, ) -> Result<Self>
pub fn open_readonly(path: impl AsRef<Path>) -> Result<Self>
pub fn path(&self) -> &Path
pub fn close(self) -> Result<()>
pub fn transaction<T>( &mut self, operation: impl FnOnce(&RusqliteStore<'_>) -> Result<T>, ) -> Result<T>
pub fn put_objects_batch(&self, objects: &[ObjectRecord]) -> Result<()>
pub fn put_file_recipe_cache_batch( &self, entries: &[(Hash32, Hash32)], ) -> Result<()>
pub fn put_chunk( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>
pub fn put_recipe( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>
pub fn existing_hashes(&self, hashes: &[Hash32]) -> Result<HashSet<Hash32>>
pub fn chunk_stored_bytes(&self, hash: &Hash32) -> Result<Option<u64>>
pub fn chunk_sizes(&self) -> Result<Vec<(Hash32, u64)>>
pub fn file_recipe_cache(&self) -> Result<HashMap<Hash32, Hash32>>
pub fn recipe_for_file_hash(&self, hash: &Hash32) -> Result<Option<Hash32>>
pub fn all_objects(&self) -> Result<Vec<VerifiedObject>>
pub fn object_records( &self, offset: u64, limit: usize, ) -> Result<Vec<ObjectRecord>>
pub fn rebuild_merkle_index(&self) -> Result<MerkleSummary>
pub fn merkle_summary(&self) -> Result<MerkleSummary>
pub fn recompute_merkle_summary(&self) -> Result<MerkleSummary>
pub fn prove_membership(&self, hash: &Hash32) -> Result<Option<MerkleProof>>
pub fn prove_memberships_batch( &self, hashes: &[Hash32], ) -> Result<Vec<Option<MerkleProof>>>
pub fn verify_proof( target: &Hash32, proof: &MerkleProof, expected_root: &Hash32, leaf_count: u64, ) -> bool
pub fn integrity_check(&self) -> Result<()>
pub fn verified_object_hashes(&self) -> Result<Vec<Hash32>>
Trait Implementations§
Source§impl ObjectSource for SqlitePack
impl ObjectSource for SqlitePack
fn read_object(&self, hash: &Hash32) -> Result<Option<VerifiedObject>>
Auto Trait Implementations§
impl !Freeze for SqlitePack
impl !RefUnwindSafe for SqlitePack
impl !Sync for SqlitePack
impl !UnwindSafe for SqlitePack
impl Send for SqlitePack
impl Unpin for SqlitePack
impl UnsafeUnpin for SqlitePack
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