pub struct FileContextStore { /* private fields */ }Implementations§
Source§impl FileContextStore
impl FileContextStore
pub fn new(root: impl AsRef<Path>) -> Self
pub fn save( &self, response: &CompactResponse, ) -> Result<PathBuf, ContextGovernorError>
pub fn load( &self, receipt_id: &str, ) -> Result<CompactResponse, ContextGovernorError>
pub fn list_receipts(&self) -> Result<Vec<String>, ContextGovernorError>
pub fn status(&self) -> Result<FileContextStoreStatusV1, ContextGovernorError>
pub fn prune_receipts_keep_last( &self, keep_last: usize, ) -> Result<FileContextStorePruneResultV1, ContextGovernorError>
pub fn expand( &self, receipt_id: &str, item_id: &str, max_chars: usize, ) -> Result<ContextExpandResult, ContextGovernorError>
pub fn search( &self, query: &str, top_k: usize, scope: SearchScope, ) -> Result<Vec<StoredContextSearchHit>, ContextGovernorError>
Trait Implementations§
Source§impl Clone for FileContextStore
impl Clone for FileContextStore
Source§fn clone(&self) -> FileContextStore
fn clone(&self) -> FileContextStore
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 moreAuto Trait Implementations§
impl !Freeze for FileContextStore
impl !RefUnwindSafe for FileContextStore
impl !Sync for FileContextStore
impl Send for FileContextStore
impl Unpin for FileContextStore
impl UnsafeUnpin for FileContextStore
impl UnwindSafe for FileContextStore
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