pub struct ClawDB { /* private fields */ }Implementations§
Source§impl ClawDB
impl ClawDB
Sourcepub fn builder() -> ClawDBBuilder
pub fn builder() -> ClawDBBuilder
Create a builder to configure and construct a ClawDB client.
Sourcepub async fn auto_provision() -> SdkResult<Self>
pub async fn auto_provision() -> SdkResult<Self>
Automatically provision a usable endpoint following the SDK fallback order.
Sourcepub async fn from_api_key(
api_key: impl Into<String>,
endpoint: impl Into<String>,
) -> SdkResult<Self>
pub async fn from_api_key( api_key: impl Into<String>, endpoint: impl Into<String>, ) -> SdkResult<Self>
Create a client from an API key and endpoint.
Sourcepub async fn remember(&self, content: impl Into<String>) -> SdkResult<Uuid>
pub async fn remember(&self, content: impl Into<String>) -> SdkResult<Uuid>
Store a memory in ClawDB.
Sourcepub async fn search(
&self,
query: impl Into<String>,
opts: SearchOptions,
) -> SdkResult<Vec<SearchHit>>
pub async fn search( &self, query: impl Into<String>, opts: SearchOptions, ) -> SdkResult<Vec<SearchHit>>
Search memories semantically.
Sourcepub async fn search_top_k(
&self,
query: impl Into<String>,
k: u32,
) -> SdkResult<Vec<String>>
pub async fn search_top_k( &self, query: impl Into<String>, k: u32, ) -> SdkResult<Vec<String>>
Search and return only the top result content.
Sourcepub async fn fork(
&self,
name: impl Into<String>,
parent: Option<&str>,
) -> SdkResult<BranchInfo>
pub async fn fork( &self, name: impl Into<String>, parent: Option<&str>, ) -> SdkResult<BranchInfo>
Fork a new memory branch.
Sourcepub async fn merge(
&self,
source: impl Into<String>,
into: &str,
strategy: &str,
) -> SdkResult<MergeResult>
pub async fn merge( &self, source: impl Into<String>, into: &str, strategy: &str, ) -> SdkResult<MergeResult>
Merge a branch into a target.
Sourcepub async fn diff(
&self,
branch_a: &str,
branch_b: &str,
) -> SdkResult<DiffResult>
pub async fn diff( &self, branch_a: &str, branch_b: &str, ) -> SdkResult<DiffResult>
Diff two branches.
Sourcepub async fn sync_push(&self) -> SdkResult<SyncResult>
pub async fn sync_push(&self) -> SdkResult<SyncResult>
Push memories to ClawDB Cloud.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClawDB
impl !RefUnwindSafe for ClawDB
impl Send for ClawDB
impl Sync for ClawDB
impl Unpin for ClawDB
impl UnsafeUnpin for ClawDB
impl !UnwindSafe for ClawDB
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