[−][src]Struct sapper::App
Sapper app struct
Fields
address: String
port: u32
armor: Option<Arc<Box<dyn SapperArmor + Send + Sync + 'static>>>
routers: Router
static_file_service: bool
init_closure: Option<Arc<Box<dyn Fn(&mut SapperRequest) -> Result<()> + Send + Sync + 'static>>>
not_found: Option<String>
Methods
impl SapperApp
[src]
pub fn new() -> SapperApp
[src]
pub fn address(&mut self, address: &str) -> &mut Self
[src]
pub fn port(&mut self, port: u32) -> &mut Self
[src]
pub fn static_file_service(&mut self, open: bool) -> &mut Self
[src]
pub fn with_armor(
&mut self,
w: Box<dyn SapperArmor + Send + Sync + 'static>
) -> &mut Self
[src]
&mut self,
w: Box<dyn SapperArmor + Send + Sync + 'static>
) -> &mut Self
pub fn init_global(
&mut self,
clos: Box<dyn Fn(&mut SapperRequest) -> Result<()> + Send + Sync + 'static>
) -> &mut Self
[src]
&mut self,
clos: Box<dyn Fn(&mut SapperRequest) -> Result<()> + Send + Sync + 'static>
) -> &mut Self
pub fn not_found_page(&mut self, page: String) -> &mut Self
[src]
pub fn add_module(&mut self, sm: Box<dyn SapperModule>) -> &mut Self
[src]
pub fn run_http(self)
[src]
Trait Implementations
impl Handler for SapperApp
[src]
fn handle(&self, req: Request, res: Response)
[src]
do actual handling for a request
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]
fn on_connection_start(&self)
[src]
fn on_connection_end(&self)
[src]
Auto Trait Implementations
impl Send for SapperApp
impl Sync for SapperApp
impl Unpin for SapperApp
impl !UnwindSafe for SapperApp
impl !RefUnwindSafe for SapperApp
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<F> Handler for F where
F: Fn(Request, Response<Fresh>) + Sync + Send,
[src]
F: Fn(Request, Response<Fresh>) + Sync + Send,
fn handle(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>)
[src]
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]
fn on_connection_start(&self)
[src]
fn on_connection_end(&self)
[src]
impl<T> UnsafeAny for T where
T: Any,
T: Any,