#[non_exhaustive]pub struct Grant {
pub tool_name: String,
pub content: Option<String>,
pub scope: GrantScope,
pub matching: GrantMatch,
}Expand description
An allow for calls to one tool.
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: String§content: Option<String>None allows every call to the tool. Otherwise matched as matching
says.
A grant relayed from project-controlled data — a skill’s frontmatter —
must not be None: anyone who can write a file in the repository could
then switch off confirmation for Bash wholesale.
scope: GrantScope§matching: GrantMatchA GrantScope::Turn grant is a skill’s rule pattern; a
GrantScope::Session or GrantScope::Project one is a person’s
answer about one call, so it covers that call’s content exactly and
not whatever the text happens to match as a pattern.
Implementations§
Trait Implementations§
impl Eq for Grant
impl StructuralPartialEq for Grant
Auto Trait Implementations§
impl Forget for Grant
impl Freeze for Grant
impl Move for Grant
impl RefUnwindSafe for Grant
impl Send for Grant
impl Sync for Grant
impl Unpin for Grant
impl UnsafeUnpin for Grant
impl UnwindSafe for Grant
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