pub struct LeafIrohStore {
pub client: Iroh,
pub docs: Arc<Cache<NamespaceId, Doc>>,
}Fields§
§client: Iroh§docs: Arc<Cache<NamespaceId, Doc>>Implementations§
Source§impl LeafIrohStore
impl LeafIrohStore
pub fn new(client: Iroh) -> Self
Sourcepub async fn open(&self, ns: NamespaceId) -> Result<Doc>
pub async fn open(&self, ns: NamespaceId) -> Result<Doc>
Open a document using the local document cache.
pub fn get_entity_key(subspace: SubspaceId, path: &[PathSegment]) -> Vec<u8> ⓘ
Trait Implementations§
Source§impl Clone for LeafIrohStore
impl Clone for LeafIrohStore
Source§fn clone(&self) -> LeafIrohStore
fn clone(&self) -> LeafIrohStore
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 Debug for LeafIrohStore
impl Debug for LeafIrohStore
Source§impl LeafStore for LeafIrohStore
impl LeafStore for LeafIrohStore
Source§fn key_resolvers(
&self,
) -> Box<dyn Iterator<Item = &dyn KeyResolverImpl<Digest>> + '_>
fn key_resolvers( &self, ) -> Box<dyn Iterator<Item = &dyn KeyResolverImpl<Digest>> + '_>
Get an iterator over key resolver algorithms implemented by this backend.
Source§fn encryption_algorithms(
&self,
) -> Box<dyn Iterator<Item = &dyn EncryptionAlgorithmImpl<Digest>> + '_>
fn encryption_algorithms( &self, ) -> Box<dyn Iterator<Item = &dyn EncryptionAlgorithmImpl<Digest>> + '_>
Get an iterator over encryption algorithms implemented by this backend.
Source§async fn store_blob(
&self,
data: &[u8],
link: &ExactLink,
entity_snapshot_id: Digest,
) -> Result<Digest>
async fn store_blob( &self, data: &[u8], link: &ExactLink, entity_snapshot_id: Digest, ) -> Result<Digest>
Store a blob for an entity snapshot. Read more
Source§async fn del_blobs(
&self,
link: &ExactLink,
entity_snapshot_id: Digest,
) -> Result<usize>
async fn del_blobs( &self, link: &ExactLink, entity_snapshot_id: Digest, ) -> Result<usize>
Delete a blob. This doesn’t necessarily delete the blob immediately, but it removes the
garbage collector pin for the entity snapshot. Read more
Source§async fn get_blob(&self, digest: Digest) -> Result<Vec<u8>>
async fn get_blob(&self, digest: Digest) -> Result<Vec<u8>>
Get’s a blob from the local store.
async fn store_entity(&self, link: &ExactLink, data: Vec<u8>) -> Result<Digest>
async fn del_entity(&self, link: &ExactLink) -> Result<()>
async fn get_entity(&self, link: &ExactLink) -> Result<Option<Digest>>
async fn list( &self, link: ExactLink, limit: Option<u64>, offset: Option<u64>, ) -> Result<impl Stream<Item = Result<ExactLink>>>
async fn create_subspace(&self) -> Result<SubspaceId>
async fn import_subspace_secret( &self, author_secret: [u8; 32], ) -> Result<SubspaceId>
async fn get_subspace_secret( &self, author: SubspaceId, ) -> Result<Option<SubspaceSecretKey>>
async fn create_namespace(&self) -> Result<NamespaceId>
async fn import_namespace_secret( &self, namespace_secret: [u8; 32], ) -> Result<NamespaceId>
async fn get_namespace_secret( &self, namespace: NamespaceId, ) -> Result<Option<NamespaceSecretKey>>
async fn list_subspaces(&self) -> Result<impl Stream<Item = Result<SubspaceId>>>
async fn list_namespaces( &self, ) -> Result<impl Stream<Item = Result<NamespaceId>>>
Auto Trait Implementations§
impl !RefUnwindSafe for LeafIrohStore
impl !UnwindSafe for LeafIrohStore
impl Freeze for LeafIrohStore
impl Send for LeafIrohStore
impl Sync for LeafIrohStore
impl Unpin for LeafIrohStore
impl UnsafeUnpin for LeafIrohStore
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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