Skip to main content

RusqliteStore

Struct RusqliteStore 

Source
pub struct RusqliteStore<'connection> { /* private fields */ }

Implementations§

Source§

impl<'connection> RusqliteStore<'connection>

Source

pub fn from_connection(connection: &'connection Connection) -> Result<Self>

Source

pub fn from_connection_with_namespace( connection: &'connection Connection, namespace: impl AsRef<str>, ) -> Result<Self>

Source

pub fn from_connection_with_options( connection: &'connection Connection, options: SqliteStoreOptions, ) -> Result<Self>

Source

pub fn ensure_schema(connection: &Connection) -> Result<()>

Source

pub fn ensure_schema_with_options( connection: &Connection, options: &SqliteStoreOptions, ) -> Result<()>

Source

pub fn connection(&self) -> &Connection

Source

pub fn namespace(&self) -> Option<&str>

Source

pub fn merkle_mode(&self) -> MerkleMode

Source

pub fn put_objects_batch(&self, objects: &[ObjectRecord]) -> Result<()>

Source

pub fn put_file_recipe_cache_batch( &self, entries: &[(Hash32, Hash32)], ) -> Result<()>

Source

pub fn put_chunk( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>

Source

pub fn put_recipe( &self, hash: Hash32, content: &[u8], codec: Codec, ) -> Result<()>

Source

pub fn read_object_record(&self, hash: &Hash32) -> Result<Option<ObjectRecord>>

Source

pub fn existing_hashes(&self, hashes: &[Hash32]) -> Result<HashSet<Hash32>>

Source

pub fn chunk_stored_bytes(&self, hash: &Hash32) -> Result<Option<u64>>

Source

pub fn chunk_sizes(&self) -> Result<Vec<(Hash32, u64)>>

Source

pub fn file_recipe_cache(&self) -> Result<HashMap<Hash32, Hash32>>

Source

pub fn recipe_for_file_hash(&self, file_hash: &Hash32) -> Result<Option<Hash32>>

Source

pub fn all_objects(&self) -> Result<Vec<VerifiedObject>>

Source

pub fn object_records( &self, offset: u64, limit: usize, ) -> Result<Vec<ObjectRecord>>

Source

pub fn integrity_check(&self) -> Result<()>

Source

pub fn rebuild_merkle_index(&self) -> Result<MerkleSummary>

Source

pub fn merkle_summary(&self) -> Result<MerkleSummary>

Source

pub fn recompute_merkle_summary(&self) -> Result<MerkleSummary>

Source

pub fn prove_membership(&self, hash: &Hash32) -> Result<Option<MerkleProof>>

Source

pub fn prove_memberships_batch( &self, hashes: &[Hash32], ) -> Result<Vec<Option<MerkleProof>>>

Source

pub fn verify_proof( target: &Hash32, proof: &MerkleProof, expected_root: &Hash32, leaf_count: u64, ) -> bool

Source

pub fn verified_object_hashes(&self) -> Result<Vec<Hash32>>

Trait Implementations§

Auto Trait Implementations§

§

impl<'connection> !RefUnwindSafe for RusqliteStore<'connection>

§

impl<'connection> !Send for RusqliteStore<'connection>

§

impl<'connection> !Sync for RusqliteStore<'connection>

§

impl<'connection> !UnwindSafe for RusqliteStore<'connection>

§

impl<'connection> Freeze for RusqliteStore<'connection>

§

impl<'connection> Unpin for RusqliteStore<'connection>

§

impl<'connection> UnsafeUnpin for RusqliteStore<'connection>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.