Struct scratch_server::HttpServer
source · 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, ) -> 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 Freeze for HttpServer
impl !RefUnwindSafe for HttpServer
impl Send for HttpServer
impl Sync for HttpServer
impl Unpin for HttpServer
impl !UnwindSafe 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