pub struct Leaf<Store: LeafStore> {
pub store: Store,
}
Expand description
The leaf store, the entrypoint to the leaf API.
Fields§
§store: Store
The backend store.
Implementations§
Source§impl<S: LeafStore + Clone> Leaf<S>
impl<S: LeafStore + Clone> Leaf<S>
pub async fn create_subspace(&self) -> Result<SubspaceId>
pub async fn import_subspace_secret( &self, secret: SubspaceSecretKey, ) -> Result<SubspaceId>
pub async fn get_subspace_secret( &self, subspace: SubspaceId, ) -> Result<Option<SubspaceSecretKey>>
pub async fn create_namespace(&self) -> Result<NamespaceId>
pub async fn import_namespace_secret( &self, secret: NamespaceSecretKey, ) -> Result<NamespaceId>
pub async fn get_namespace_secret( &self, namespace: NamespaceId, ) -> Result<Option<NamespaceSecretKey>>
Sourcepub async fn entity<L: Into<ExactLink>>(
&self,
link: L,
) -> Result<EntityEntry<S>>
pub async fn entity<L: Into<ExactLink>>( &self, link: L, ) -> Result<EntityEntry<S>>
Load an entity entry
pub async fn del_entity<L: Into<ExactLink>>(&self, link: L) -> Result<()>
pub async fn list<L: Into<ExactLink>>( &self, link: L, ) -> Result<impl Stream<Item = Result<ExactLink>> + '_>
pub async fn list_namespaces( &self, ) -> Result<impl Stream<Item = Result<NamespaceId, Error>> + '_>
pub async fn list_subspaces( &self, ) -> Result<impl Stream<Item = Result<SubspaceId, Error>> + '_>
Trait Implementations§
Auto Trait Implementations§
impl<Store> Freeze for Leaf<Store>where
Store: Freeze,
impl<Store> RefUnwindSafe for Leaf<Store>where
Store: RefUnwindSafe,
impl<Store> Send for Leaf<Store>where
Store: Send,
impl<Store> Sync for Leaf<Store>where
Store: Sync,
impl<Store> Unpin for Leaf<Store>where
Store: Unpin,
impl<Store> UnwindSafe for Leaf<Store>where
Store: UnwindSafe,
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