pub struct Server { /* private fields */ }Implementations§
Source§impl Server
impl Server
pub fn new() -> Self
pub fn host(&mut self, host: &'static str) -> &mut Self
pub fn port(&mut self, port: usize) -> &mut Self
pub fn router<F>(&mut self, route: &'static str, func: F) -> &mut Self
pub fn middleware<F>(&mut self, func: F) -> &mut Self
pub fn listen(&mut self) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Server
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
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