[−][src]Trait fastly::request::RequestBuilderExt
Fastly-specific extensions to http::request::Builder
.
Required methods
fn fastly_metadata_ref(&self) -> Option<&FastlyRequestMetadata>
Get a reference to the Fastly-specific metadata associated with this request.
Returns None
if this builder has an error.
fn fastly_metadata_mut(&mut self) -> Option<&mut FastlyRequestMetadata>
Get a mutable reference to the Fastly-specific metadata associated with this request.
Returns None
if this builder has an error.
Provided methods
fn cache_override(self, cache_override: CacheOverride) -> Self
Set the cache override behavior for this request.
This will override the behavior defined by the backend response headers, as well as any
previous override calls on this builder (e.g., pass()
, ttl()
).
fn cache_override_ref(&self) -> Option<&CacheOverride>
Get a reference to the cache override behavior for this request.
Returns None
if this builder has an error.
fn cache_override_mut(&mut self) -> Option<&mut CacheOverride>
Get a mutable reference to the cache override behavior for this request.
Returns None
if this builder has an error.
fn pass(self) -> Self
Set the cache override behavior for this request to Pass.
This will override the behavior defined by the backend response headers, as well as any
previous calls on this builder to set the TTL or stale-while-revalidate
time.
fn ttl(self, ttl: u32) -> Self
Set the cache override behavior for this request to use given TTL.
This option can be combined with a stale-while-revalidate
override.
This will override the behavior defined by the backend response headers, as well as any previous calls on this builder to set Pass.
fn stale_while_revalidate(self, swr: u32) -> Self
Set the cache override behavior for this request to use given stale-while-revalidate
time.
This option can be combined with a TTL override.
This will override the behavior defined by the backend response headers, as well as any previous calls on this builder to set Pass.