Enum sunfish::Page [−][src]
pub enum Page { Static { paths: Option<Box<dyn Send + Sync + Fn() -> Vec<String> + 'static>>, handler: Box<dyn Send + Sync + Fn(String) -> String + 'static>, }, Dynamic { handler: DynamicHandler, }, }
Variants
Show fields
Show fields
Fields of Dynamic
handler: DynamicHandler
Implementations
pub fn new_static_with_paths<P, H>(paths: P, handler: H) -> Page where
P: 'static + Send + Sync + Fn() -> Vec<String>,
H: 'static + Send + Sync + Fn(String) -> String,
pub fn new_dynamic<H>(handler: H) -> Page where
H: 'static + Send + Sync + for<'a> Fn(&'a mut Request<Body>) -> DynamicHandlerOutput<'a>,
Auto Trait Implementations
impl !RefUnwindSafe for Page
impl !UnwindSafe for Page
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self