pub struct MemoryGrantStore { /* private fields */ }Expand description
In-memory grant store.
Grants are cleared when the process exits. This is the default store used by the agent.
Implementations§
Source§impl MemoryGrantStore
impl MemoryGrantStore
Sourcepub async fn grant_tool(&self, tool: &str) -> Result<(), GrantStoreError>
pub async fn grant_tool(&self, tool: &str) -> Result<(), GrantStoreError>
Grant permission to use a tool (any parameters).
Convenience method for save(Grant::tool(name)).
Trait Implementations§
Source§impl Default for MemoryGrantStore
impl Default for MemoryGrantStore
Source§impl GrantStore for MemoryGrantStore
impl GrantStore for MemoryGrantStore
Source§fn save<'life0, 'async_trait>(
&'life0 self,
grant: Grant,
) -> Pin<Box<dyn Future<Output = Result<(), GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn save<'life0, 'async_trait>(
&'life0 self,
grant: Grant,
) -> Pin<Box<dyn Future<Output = Result<(), GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Save a grant to storage.
Source§fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
tool: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Grant>, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load<'life0, 'life1, 'async_trait>(
&'life0 self,
tool: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Grant>, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load all grants for a specific tool.
Source§fn load_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Grant>, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Grant>, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load all grants across all tools.
Source§fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params_hash: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tool: &'life1 str,
params_hash: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<bool, GrantStoreError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a specific grant. Read more
Auto Trait Implementations§
impl !Freeze for MemoryGrantStore
impl RefUnwindSafe for MemoryGrantStore
impl Send for MemoryGrantStore
impl Sync for MemoryGrantStore
impl Unpin for MemoryGrantStore
impl UnwindSafe for MemoryGrantStore
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