pub enum CheckRequest<'a> {
Tool {
context: &'a AgentContext,
tool_name: &'a str,
},
Path {
context: &'a AgentContext,
path: &'a Path,
mode: PathMode,
},
Exec {
context: &'a AgentContext,
binary: &'a str,
args: &'a [String],
},
Network {
context: &'a AgentContext,
},
Fork {
context: &'a AgentContext,
},
}Expand description
Authorization check request.
Variants§
Tool
Tool usage.
Fields
§
context: &'a AgentContextAgent context whose permissions are being checked.
Path
Path access.
Fields
§
context: &'a AgentContextAgent context whose permissions are being checked.
Exec
Command execution.
Fields
§
context: &'a AgentContextAgent context whose permissions are being checked.
Network
Network access.
Fields
§
context: &'a AgentContextAgent context whose permissions are being checked.
Fork
Agent fork.
Fields
§
context: &'a AgentContextAgent context whose permissions are being checked.
Implementations§
Source§impl<'a> CheckRequest<'a>
impl<'a> CheckRequest<'a>
Sourcepub fn agent_context(&self) -> &AgentContext
pub fn agent_context(&self) -> &AgentContext
Agent context.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CheckRequest<'a>
impl<'a> RefUnwindSafe for CheckRequest<'a>
impl<'a> Send for CheckRequest<'a>
impl<'a> Sync for CheckRequest<'a>
impl<'a> Unpin for CheckRequest<'a>
impl<'a> UnsafeUnpin for CheckRequest<'a>
impl<'a> UnwindSafe for CheckRequest<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.