pub struct ProtectedTool<P, R, F>where
P: Permission,
R: Resource,{ /* private fields */ }Expand description
A tool that cannot run unless the caller supplies a matching capability.
Implementations§
Source§impl<P, R, F> ProtectedTool<P, R, F>where
P: Permission,
R: Resource,
impl<P, R, F> ProtectedTool<P, R, F>where
P: Permission,
R: Resource,
Source§impl<P, R, F> ProtectedTool<P, R, F>
impl<P, R, F> ProtectedTool<P, R, F>
Sourcepub async fn invoke(
&self,
agent: &SecureAgent<Authenticated>,
cap: &Capability<P, R>,
) -> Result<(), TaskError>
pub async fn invoke( &self, agent: &SecureAgent<Authenticated>, cap: &Capability<P, R>, ) -> Result<(), TaskError>
Invoke the tool with a typed capability.
Auto Trait Implementations§
impl<P, R, F> Freeze for ProtectedTool<P, R, F>
impl<P, R, F> RefUnwindSafe for ProtectedTool<P, R, F>where
R: RefUnwindSafe,
F: RefUnwindSafe,
impl<P, R, F> Send for ProtectedTool<P, R, F>where
F: Send,
impl<P, R, F> Sync for ProtectedTool<P, R, F>where
F: Sync,
impl<P, R, F> Unpin for ProtectedTool<P, R, F>
impl<P, R, F> UnsafeUnpin for ProtectedTool<P, R, F>where
R: UnsafeUnpin,
F: UnsafeUnpin,
impl<P, R, F> UnwindSafe for ProtectedTool<P, R, F>where
R: UnwindSafe,
F: UnwindSafe,
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