pub struct WebFetchTool;Expand description
P4c (S2 module 5 tools.web, S4a “trivially addable… single tool
each, no loop changes”): fetch a URL and return its response body
(capped, text-decoded lossily). NOT registered by default — only reached
via [capabilities.tools_web] (module 5), off by default (§3.1). SECURITY
(S2.1 S17): honors ToolContext::network_policy when one is configured
(see ToolContext::check_network) — a caller (SDK embedder) that has set
up a sandbox/network policy on the context gets it enforced here too;
with no policy configured (today’s honest default), the fetch is
unrestricted, same posture as every other network-capable path in this
crate today (C3).
Trait Implementations§
Source§impl Tool for WebFetchTool
impl Tool for WebFetchTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
The built-in description. May be overridden via
crate::Config.Source§fn parameters(&self) -> Value
fn parameters(&self) -> Value
JSON Schema describing the tool’s input object.
Auto Trait Implementations§
impl Freeze for WebFetchTool
impl RefUnwindSafe for WebFetchTool
impl Send for WebFetchTool
impl Sync for WebFetchTool
impl Unpin for WebFetchTool
impl UnsafeUnpin for WebFetchTool
impl UnwindSafe for WebFetchTool
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