Struct spring_web::config::StaticAssetsMiddleware
source · pub struct StaticAssetsMiddleware {
pub enable: bool,
pub must_exist: bool,
pub fallback: String,
pub precompressed: bool,
pub uri: String,
pub path: String,
}
Expand description
Static asset middleware configuration
Fields§
§enable: bool
toggle enable
must_exist: bool
Check that assets must exist on disk
fallback: String
Fallback page for a case when no asset exists (404). Useful for SPA (single page app) where routes are virtual.
precompressed: bool
Enable precompressed_gzip
uri: String
Uri for the assets
path: String
Path for the assets
Trait Implementations§
source§impl Clone for StaticAssetsMiddleware
impl Clone for StaticAssetsMiddleware
source§fn clone(&self) -> StaticAssetsMiddleware
fn clone(&self) -> StaticAssetsMiddleware
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StaticAssetsMiddleware
impl Debug for StaticAssetsMiddleware
source§impl<'de> Deserialize<'de> for StaticAssetsMiddleware
impl<'de> Deserialize<'de> for StaticAssetsMiddleware
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for StaticAssetsMiddleware
impl JsonSchema for StaticAssetsMiddleware
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreAuto Trait Implementations§
impl Freeze for StaticAssetsMiddleware
impl RefUnwindSafe for StaticAssetsMiddleware
impl Send for StaticAssetsMiddleware
impl Sync for StaticAssetsMiddleware
impl Unpin for StaticAssetsMiddleware
impl UnwindSafe for StaticAssetsMiddleware
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)