Struct submillisecond::Application
source · pub struct Application<T, Kind, Arg, Ret> { /* private fields */ }
Expand description
An application containing a router for listening and handling incoming requests.
Example
use submillisecond::{router, Application};
fn index() -> &'static str { "Welcome" }
Application::new(router! {
GET "/" => index
})
.serve("0.0.0.0:3000")
Implementations§
source§impl<T, Kind, Arg, Ret> Application<T, Kind, Arg, Ret>where
T: ProcessSafeHandler<Kind, Arg, Ret>,
impl<T, Kind, Arg, Ret> Application<T, Kind, Arg, Ret>where T: ProcessSafeHandler<Kind, Arg, Ret>,
Trait Implementations§
source§impl<T: Clone, Kind: Clone, Arg: Clone, Ret: Clone> Clone for Application<T, Kind, Arg, Ret>
impl<T: Clone, Kind: Clone, Arg: Clone, Ret: Clone> Clone for Application<T, Kind, Arg, Ret>
source§fn clone(&self) -> Application<T, Kind, Arg, Ret>
fn clone(&self) -> Application<T, Kind, Arg, Ret>
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 moreimpl<T: Copy, Kind: Copy, Arg: Copy, Ret: Copy> Copy for Application<T, Kind, Arg, Ret>
Auto Trait Implementations§
impl<T, Kind, Arg, Ret> RefUnwindSafe for Application<T, Kind, Arg, Ret>where Arg: RefUnwindSafe, Kind: RefUnwindSafe, Ret: RefUnwindSafe, T: RefUnwindSafe,
impl<T, Kind, Arg, Ret> Send for Application<T, Kind, Arg, Ret>where Arg: Send, Kind: Send, Ret: Send, T: Send,
impl<T, Kind, Arg, Ret> Sync for Application<T, Kind, Arg, Ret>where Arg: Sync, Kind: Sync, Ret: Sync, T: Sync,
impl<T, Kind, Arg, Ret> Unpin for Application<T, Kind, Arg, Ret>where Arg: Unpin, Kind: Unpin, Ret: Unpin, T: Unpin,
impl<T, Kind, Arg, Ret> UnwindSafe for Application<T, Kind, Arg, Ret>where Arg: UnwindSafe, Kind: UnwindSafe, Ret: UnwindSafe, T: UnwindSafe,
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