pub struct Server { /* private fields */ }
Implementations§
Source§impl Server
impl Server
pub fn new() -> Self
pub fn route<F>(&mut self, path: &str, func: F)
pub fn static_route(&mut self, path: &str, content: &str)
pub fn add_route_to_sitemap( &self, path: &str, lastmod: bool, changefreq: &str, priority: f32, base_url: &str, )
pub fn generate_sitemap( &self, sitemap: bool, lastmod: bool, changefreq: &str, priority: f32, base_url: &str, )
pub fn load_static_files(&mut self, static_folder: &str)
pub fn run(self, ip: &str, port: &str)
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