#[non_exhaustive]pub struct ToolFacts {
pub subject: Subject,
pub traits: CallTraits,
pub stance: ModeStance,
pub origin: ToolOrigin,
pub reach: Reach,
pub runs: Option<Runs>,
pub question: Option<String>,
pub relays: Option<Relays>,
pub also_named: Option<String>,
pub lands_at: Option<PathBuf>,
pub host_permits: bool,
}Expand description
Everything the permission policy reads about one call: the tool’s spec,
its CallTraits for the input and its PermissionFacts.
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.subject: Subject§traits: CallTraits§stance: ModeStance§origin: ToolOrigin§reach: Reach§runs: Option<Runs>§question: Option<String>§relays: Option<Relays>§also_named: Option<String>§lands_at: Option<PathBuf>§host_permits: boolThe host’s declaration lets the call through. A tool’s own word is not enough: the session running the call keeps it only for a host tool it admitted under that name.
Implementations§
Source§impl ToolFacts
impl ToolFacts
Sourcepub async fn gather(tool: &dyn Tool, input: &Value, ctx: &ToolContext) -> Self
pub async fn gather(tool: &dyn Tool, input: &Value, ctx: &ToolContext) -> Self
Gathered once per call, by the session that runs it and with the context it runs with.
Sourcepub fn unknown_tool() -> Self
pub fn unknown_tool() -> Self
For a name no tool answers to: claims nothing, not even a read.
Trait Implementations§
impl Eq for ToolFacts
impl StructuralPartialEq for ToolFacts
Auto Trait Implementations§
impl Forget for ToolFacts
impl Freeze for ToolFacts
impl Move for ToolFacts
impl RefUnwindSafe for ToolFacts
impl Send for ToolFacts
impl Sync for ToolFacts
impl Unpin for ToolFacts
impl UnsafeUnpin for ToolFacts
impl UnwindSafe for ToolFacts
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