pub struct SqliteStore { /* private fields */ }Implementations§
Source§impl SqliteStore
impl SqliteStore
pub async fn open(path: impl AsRef<Path>) -> Result<Self>
pub async fn open_with_options( path: impl AsRef<Path>, options: SqliteStoreOptions, ) -> Result<Self>
pub async fn from_pool(pool: SqlitePool) -> Result<Self>
pub async fn from_pool_with_namespace( pool: SqlitePool, namespace: impl AsRef<str>, ) -> Result<Self>
pub async fn from_pool_with_options( pool: SqlitePool, options: SqliteStoreOptions, ) -> Result<Self>
pub async fn ensure_schema(pool: &SqlitePool) -> Result<()>
pub async fn ensure_schema_with_namespace( pool: &SqlitePool, namespace: impl AsRef<str>, ) -> Result<()>
pub async fn ensure_schema_with_options( pool: &SqlitePool, options: &SqliteStoreOptions, ) -> Result<()>
pub fn pool(&self) -> &SqlitePool
pub fn namespace(&self) -> Option<&str>
pub fn merkle_mode(&self) -> MerkleMode
pub async fn begin_write_tx(&self) -> Result<StoreWriteTx<'_>>
pub async fn put_objects_batch_tx( &self, tx: &mut StoreWriteTx<'_>, objects: &[ObjectRecord], ) -> Result<()>
pub async fn put_file_recipe_cache_batch_tx( &self, tx: &mut StoreWriteTx<'_>, entries: &[(Hash32, Hash32)], ) -> Result<()>
pub async fn put_chunk( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>
pub async fn put_recipe( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>
pub async fn existing_hashes( &self, hashes: &[Hash32], ) -> Result<HashSet<Hash32>>
pub async fn chunk_sizes(&self) -> Result<Vec<(Hash32, u64)>>
pub async fn file_recipe_cache(&self) -> Result<HashMap<Hash32, Hash32>>
pub async fn recipe_for_file_hash( &self, file_hash: &Hash32, ) -> Result<Option<Hash32>>
pub async fn all_objects(&self) -> Result<Vec<VerifiedObject>>
pub async fn integrity_check(&self) -> Result<()>
pub async fn rebuild_merkle_index(&self) -> Result<MerkleSummary>
pub async fn merkle_summary(&self) -> Result<MerkleSummary>
pub async fn prove_membership( &self, hash: &Hash32, ) -> Result<Option<MerkleProof>>
pub fn verify_proof( target: &Hash32, proof: &MerkleProof, expected_root: &Hash32, leaf_count: u64, ) -> bool
Trait Implementations§
Source§impl Clone for SqliteStore
impl Clone for SqliteStore
Source§fn clone(&self) -> SqliteStore
fn clone(&self) -> SqliteStore
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 moreSource§impl ObjectSource for SqliteStore
impl ObjectSource for SqliteStore
async fn read_object(&self, hash: &Hash32) -> Result<Option<VerifiedObject>>
Auto Trait Implementations§
impl !RefUnwindSafe for SqliteStore
impl !UnwindSafe for SqliteStore
impl Freeze for SqliteStore
impl Send for SqliteStore
impl Sync for SqliteStore
impl Unpin for SqliteStore
impl UnsafeUnpin for SqliteStore
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more