pub struct BTree<S: Store> { /* private fields */ }Implementations§
Source§impl<S: Store> BTree<S>
impl<S: Store> BTree<S>
pub fn new(store: Arc<S>, options: BTreeOptions) -> Self
pub async fn insert( &self, root: Option<&Cid>, key: &str, value: &str, ) -> Result<Cid, BTreeError>
pub async fn get( &self, root: Option<&Cid>, key: &str, ) -> Result<Option<String>, BTreeError>
pub async fn insert_link( &self, root: Option<&Cid>, key: &str, target_cid: &Cid, ) -> Result<Cid, BTreeError>
pub async fn insert_link_unchecked( &self, root: Option<&Cid>, key: &str, target_cid: &Cid, ) -> Result<Cid, BTreeError>
pub async fn get_link( &self, root: Option<&Cid>, key: &str, ) -> Result<Option<Cid>, BTreeError>
pub async fn entries( &self, root: Option<&Cid>, ) -> Result<Vec<(String, String)>, BTreeError>
pub async fn links_entries( &self, root: Option<&Cid>, ) -> Result<Vec<(String, Cid)>, BTreeError>
pub async fn range( &self, root: &Cid, start: Option<&str>, end: Option<&str>, ) -> Result<Vec<(String, String)>, BTreeError>
pub async fn prefix( &self, root: &Cid, prefix: &str, ) -> Result<Vec<(String, String)>, BTreeError>
pub async fn prefix_links( &self, root: &Cid, prefix: &str, ) -> Result<Vec<(String, Cid)>, BTreeError>
pub async fn delete( &self, root: &Cid, key: &str, ) -> Result<Option<Cid>, BTreeError>
pub async fn merge( &self, base: Option<&Cid>, other: Option<&Cid>, prefer_other: bool, ) -> Result<Option<Cid>, BTreeError>
pub async fn merge_links( &self, base: Option<&Cid>, other: Option<&Cid>, prefer_other: bool, ) -> Result<Option<Cid>, BTreeError>
pub async fn build<I>(&self, items: I) -> Result<Option<Cid>, BTreeError>
pub async fn build_links<I>(&self, items: I) -> Result<Option<Cid>, BTreeError>
Auto Trait Implementations§
impl<S> Freeze for BTree<S>
impl<S> RefUnwindSafe for BTree<S>where
S: RefUnwindSafe,
impl<S> Send for BTree<S>
impl<S> Sync for BTree<S>
impl<S> Unpin for BTree<S>
impl<S> UnsafeUnpin for BTree<S>
impl<S> UnwindSafe for BTree<S>where
S: RefUnwindSafe,
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