#[non_exhaustive]pub struct CacheBehaviorPerPathBuilder { /* private fields */ }
Expand description
A builder for CacheBehaviorPerPath
.
Implementations§
source§impl CacheBehaviorPerPathBuilder
impl CacheBehaviorPerPathBuilder
sourcepub fn path(self, input: impl Into<String>) -> Self
pub fn path(self, input: impl Into<String>) -> Self
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*
), and file types (*.html, *jpg, *js
). Directories and file paths are case-sensitive.
Examples:
-
Specify the following to cache all files in the document root of an Apache web server running on a Lightsail instance.
var/www/html/
-
Specify the following file to cache only the index page in the document root of an Apache web server.
var/www/html/index.html
-
Specify the following to cache only the .html files in the document root of an Apache web server.
var/www/html/*.html
-
Specify the following to cache only the .jpg, .png, and .gif files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/*.jpg
var/www/html/images/*.png
var/www/html/images/*.gif
Specify the following to cache all files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/
sourcepub fn set_path(self, input: Option<String>) -> Self
pub fn set_path(self, input: Option<String>) -> Self
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*
), and file types (*.html, *jpg, *js
). Directories and file paths are case-sensitive.
Examples:
-
Specify the following to cache all files in the document root of an Apache web server running on a Lightsail instance.
var/www/html/
-
Specify the following file to cache only the index page in the document root of an Apache web server.
var/www/html/index.html
-
Specify the following to cache only the .html files in the document root of an Apache web server.
var/www/html/*.html
-
Specify the following to cache only the .jpg, .png, and .gif files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/*.jpg
var/www/html/images/*.png
var/www/html/images/*.gif
Specify the following to cache all files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/
sourcepub fn get_path(&self) -> &Option<String>
pub fn get_path(&self) -> &Option<String>
The path to a directory or file to cached, or not cache. Use an asterisk symbol to specify wildcard directories (path/to/assets/*
), and file types (*.html, *jpg, *js
). Directories and file paths are case-sensitive.
Examples:
-
Specify the following to cache all files in the document root of an Apache web server running on a Lightsail instance.
var/www/html/
-
Specify the following file to cache only the index page in the document root of an Apache web server.
var/www/html/index.html
-
Specify the following to cache only the .html files in the document root of an Apache web server.
var/www/html/*.html
-
Specify the following to cache only the .jpg, .png, and .gif files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/*.jpg
var/www/html/images/*.png
var/www/html/images/*.gif
Specify the following to cache all files in the images sub-directory of the document root of an Apache web server.
var/www/html/images/
sourcepub fn behavior(self, input: BehaviorEnum) -> Self
pub fn behavior(self, input: BehaviorEnum) -> Self
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
-
cache
- This behavior caches the specified path. -
dont-cache
- This behavior doesn't cache the specified path.
sourcepub fn set_behavior(self, input: Option<BehaviorEnum>) -> Self
pub fn set_behavior(self, input: Option<BehaviorEnum>) -> Self
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
-
cache
- This behavior caches the specified path. -
dont-cache
- This behavior doesn't cache the specified path.
sourcepub fn get_behavior(&self) -> &Option<BehaviorEnum>
pub fn get_behavior(&self) -> &Option<BehaviorEnum>
The cache behavior for the specified path.
You can specify one of the following per-path cache behaviors:
-
cache
- This behavior caches the specified path. -
dont-cache
- This behavior doesn't cache the specified path.
sourcepub fn build(self) -> CacheBehaviorPerPath
pub fn build(self) -> CacheBehaviorPerPath
Consumes the builder and constructs a CacheBehaviorPerPath
.
Trait Implementations§
source§impl Clone for CacheBehaviorPerPathBuilder
impl Clone for CacheBehaviorPerPathBuilder
source§fn clone(&self) -> CacheBehaviorPerPathBuilder
fn clone(&self) -> CacheBehaviorPerPathBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CacheBehaviorPerPathBuilder
impl Debug for CacheBehaviorPerPathBuilder
source§impl Default for CacheBehaviorPerPathBuilder
impl Default for CacheBehaviorPerPathBuilder
source§fn default() -> CacheBehaviorPerPathBuilder
fn default() -> CacheBehaviorPerPathBuilder
source§impl PartialEq for CacheBehaviorPerPathBuilder
impl PartialEq for CacheBehaviorPerPathBuilder
source§fn eq(&self, other: &CacheBehaviorPerPathBuilder) -> bool
fn eq(&self, other: &CacheBehaviorPerPathBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CacheBehaviorPerPathBuilder
Auto Trait Implementations§
impl Freeze for CacheBehaviorPerPathBuilder
impl RefUnwindSafe for CacheBehaviorPerPathBuilder
impl Send for CacheBehaviorPerPathBuilder
impl Sync for CacheBehaviorPerPathBuilder
impl Unpin for CacheBehaviorPerPathBuilder
impl UnwindSafe for CacheBehaviorPerPathBuilder
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> 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