pub struct VectorDbGuard { /* private fields */ }Expand description
Vector database guard (roadmap phase 7.2).
Implementations§
Source§impl VectorDbGuard
impl VectorDbGuard
Sourcepub fn new(config: VectorGuardConfig) -> Self
pub fn new(config: VectorGuardConfig) -> Self
Construct a new guard with the given configuration.
Sourcepub fn config(&self) -> &VectorGuardConfig
pub fn config(&self) -> &VectorGuardConfig
Read-only access to the configuration.
Sourcepub fn check(
&self,
call: &VectorCall,
scope: &ChioScope,
) -> Result<(), VectorGuardDenyReason>
pub fn check( &self, call: &VectorCall, scope: &ChioScope, ) -> Result<(), VectorGuardDenyReason>
Evaluate an already-extracted VectorCall against the configured
policy and the active capability scope.
Returns Ok(()) to allow; Err(VectorGuardDenyReason) to deny.
Sourcepub fn extract_call(
&self,
arguments: &Value,
) -> Result<VectorCall, VectorGuardDenyReason>
pub fn extract_call( &self, arguments: &Value, ) -> Result<VectorCall, VectorGuardDenyReason>
Extract a VectorCall from the tool arguments value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VectorDbGuard
impl RefUnwindSafe for VectorDbGuard
impl Send for VectorDbGuard
impl Sync for VectorDbGuard
impl Unpin for VectorDbGuard
impl UnsafeUnpin for VectorDbGuard
impl UnwindSafe for VectorDbGuard
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