#[non_exhaustive]pub struct PolicyCtx<'a> {
pub tool_name: &'a str,
pub safety_hint: SafetyClass,
pub args: &'a Value,
pub cwd: &'a Path,
}Expand description
Context shared by classify and record.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tool_name: &'a str§safety_hint: SafetyClass§args: &'a Value§cwd: &'a PathThe working directory of the current session. Required by path-allowlist policies; implementations that do not need it may ignore this field.
Implementations§
Auto Trait Implementations§
impl<'a> Freeze for PolicyCtx<'a>
impl<'a> RefUnwindSafe for PolicyCtx<'a>
impl<'a> Send for PolicyCtx<'a>
impl<'a> Sync for PolicyCtx<'a>
impl<'a> Unpin for PolicyCtx<'a>
impl<'a> UnsafeUnpin for PolicyCtx<'a>
impl<'a> UnwindSafe for PolicyCtx<'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