[−][src]Struct http_io::server::HttpServer
A simple HTTP server. Not suited for production workloads, better used in tests and small projects.
Methods
impl<L: Listen, H: HttpRequestHandler<L::stream>> HttpServer<L, H>
[src]
pub fn new(connection_stream: L, request_handler: H) -> Self
[src]
pub fn serve_one(&self) -> Result<()>
[src]
Accept one new HTTP stream and serve one request off it.
pub fn serve_forever(&self) -> !
[src]
Run serve_one
in a loop forever
Auto Trait Implementations
impl<L, H> Send for HttpServer<L, H> where
H: Send,
L: Send,
H: Send,
L: Send,
impl<L, H> Sync for HttpServer<L, H> where
H: Sync,
L: Sync,
H: Sync,
L: Sync,
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,