[−][src]Trait fastly::request::RequestBuilderExt
Fastly-specific extensions to http::request::Builder
.
Required methods
pub fn fastly_metadata_ref(&self) -> Option<&FastlyRequestMetadata>
[src]
Get a reference to the Fastly-specific metadata associated with this request.
Returns None
if this builder has an error.
pub fn fastly_metadata_mut(&mut self) -> Option<&mut FastlyRequestMetadata>
[src]
Get a mutable reference to the Fastly-specific metadata associated with this request.
Returns None
if this builder has an error.
Provided methods
pub fn backend(
mut self: Self,
backend: impl AsRef<str>
) -> Result<Self, BackendError>
[src]
mut self: Self,
backend: impl AsRef<str>
) -> Result<Self, BackendError>
Set the associated Backend
that this request will be sent to.
This will return an error if the given backend name was not valid.
pub fn backend_ref(&self) -> Option<&Backend>
[src]
Get a reference to the Backend
that this request will be sent to.
pub fn backend_mut(&mut self) -> Option<&mut Backend>
[src]
Get a mutable reference to the Backend
that this request will be sent to.
pub fn cache_override(mut self: Self, cache_override: CacheOverride) -> Self
[src]
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()
).
pub fn cache_override_ref(&self) -> Option<&CacheOverride>
[src]
Get a reference to the cache override behavior for this request.
Returns None
if this builder has an error.
pub fn cache_override_mut(&mut self) -> Option<&mut CacheOverride>
[src]
Get a mutable reference to the cache override behavior for this request.
Returns None
if this builder has an error.
pub fn pass(mut self: Self) -> Self
[src]
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.
pub fn ttl(mut self: Self, ttl: u32) -> Self
[src]
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.
pub fn stale_while_revalidate(mut self: Self, swr: u32) -> Self
[src]
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.
pub fn pci(mut self: Self, pci: bool) -> Self
[src]
Set the cache override behavior for this request to enable PCI/HIPAA non-volatile storage caching.
See https://docs.fastly.com/products/pci-compliant-caching-and-delivery for more information.
pub fn surrogate_key(mut self: Self, surrogate_key: HeaderValue) -> Self
[src]
Set a Surrogate-Key header value, holding potentially a number of surrogate keys, to be attached to the cached response. If the response from origin had a Surrogate-Key response, these keys will be added to them.
See https://docs.fastly.com/en/guides/purging-api-cache-with-surrogate-keys for more information on how Surrogate Keys can be used.