pub struct FetchOptions {
pub force_refresh: bool,
pub ssrf_level: SsrfLevel,
pub ssrf_project_root: Option<PathBuf>,
pub har_recorder: Option<Arc<HarRecorder>>,
pub ignore_robots: bool,
pub user_agent: String,
pub headless_mode: HeadlessMode,
pub synchronous_revalidation: bool,
}Fields§
§force_refresh: bool§ssrf_level: SsrfLevel§ssrf_project_root: Option<PathBuf>Required (some) when ssrf_level == Project. Must be pre-canonicalized.
har_recorder: Option<Arc<HarRecorder>>Optional HAR recorder. When Some, every round-trip is recorded.
ignore_robots: boolWhen true, skip the robots gate. Used by --ignore-robots.
user_agent: StringUser-Agent used for robots.txt UA-rule evaluation. Must match
[fetch] user_agent.
headless_mode: HeadlessModeM9: per-call mode selection.
synchronous_revalidation: boolWhen true, the caller opts out of the stale-while-revalidate
fast-path: on an expired cache entry, fetch_with_cache performs
the network refresh inline rather than serving stale and queueing
a background revalidate task.
Set this from any caller that does NOT have a running task
scheduler in the same process — chiefly the one-shot CLI. The
MCP server’s tools leave this false so the agent gets a fast
response and the in-process scheduler refreshes the row.
Independently of this flag, the row is also re-fetched
synchronously when the row expired more than
[cache] stale_while_revalidate_window ago, so callers never
receive arbitrarily old content.
Trait Implementations§
Source§impl Clone for FetchOptions
impl Clone for FetchOptions
Source§fn clone(&self) -> FetchOptions
fn clone(&self) -> FetchOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for FetchOptions
impl !UnwindSafe for FetchOptions
impl Freeze for FetchOptions
impl Send for FetchOptions
impl Sync for FetchOptions
impl Unpin for FetchOptions
impl UnsafeUnpin for FetchOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more