pub struct HttpServer { /* private fields */ }Implementations§
Source§impl HttpServer
impl HttpServer
pub fn build( port: u16, threads: usize, cert_path: Option<PathBuf>, cert_pass: Option<String>, bind_address: IpAddr, compression: bool, ) -> HttpServer
pub fn with_logger(self) -> Self
pub fn with_credentials(self, password: &str, username: &str) -> Self
pub fn add_routes<F>(self, routes: F) -> Self
pub fn with_cors_policy(self, policy: Cors) -> Self
pub fn run(self) -> Result<(), Box<dyn Error>>
Auto Trait Implementations§
impl !RefUnwindSafe for HttpServer
impl !UnwindSafe for HttpServer
impl Freeze for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl UnsafeUnpin for HttpServer
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