Struct wick_config::v1::StaticRouter
source · pub struct StaticRouter {
pub path: String,
pub middleware: Option<Middleware>,
pub volume: String,
pub fallback: Option<String>,
pub indexes: bool,
}Expand description
A router that serves static files.
Fields§
§path: StringThe path that this router will trigger for.
middleware: Option<Middleware>Middleware operations for this router.
volume: StringThe volume to serve static files from.
fallback: Option<String>Fallback path (relative to volume `resource`) for files to serve in case of a 404. Useful for SPA's. if volume resource is: /www and fallback: index.html, then a 404 will serve /www/index.html
indexes: boolWhether or not to serve directory listings when a directory is requested.
Trait Implementations§
source§impl Clone for StaticRouter
impl Clone for StaticRouter
source§fn clone(&self) -> StaticRouter
fn clone(&self) -> StaticRouter
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 StaticRouter
impl Debug for StaticRouter
source§impl<'de> Deserialize<'de> for StaticRouter
impl<'de> Deserialize<'de> for StaticRouter
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 PartialEq<StaticRouter> for StaticRouter
impl PartialEq<StaticRouter> for StaticRouter
source§fn eq(&self, other: &StaticRouter) -> bool
fn eq(&self, other: &StaticRouter) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for StaticRouter
impl Serialize for StaticRouter
source§impl TryFrom<StaticRouterConfig> for StaticRouter
impl TryFrom<StaticRouterConfig> for StaticRouter
§type Error = ManifestError
type Error = ManifestError
The type returned in the event of a conversion error.
impl StructuralPartialEq for StaticRouter
Auto Trait Implementations§
impl RefUnwindSafe for StaticRouter
impl Send for StaticRouter
impl Sync for StaticRouter
impl Unpin for StaticRouter
impl UnwindSafe for StaticRouter
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