[−][src]Struct izanami::server::Server
A simple HTTP server that wraps the hyper
's server implementation.
Methods
impl Server
[src]
impl Server
pub fn bind_tcp( | [src] |
Creates an HTTP server using a TCP listener.
pub fn bind_uds( | [src] |
Creates an HTTP server using a Unix domain socket listener.
impl<T, B> Server<T, B> where
T: Transport,
[src]
impl<T, B> Server<T, B> where
T: Transport,
pub fn new(transport: T) -> Self | [src] |
Create a Server
from a specific Transport
.
pub fn transport(&mut self) -> &mut T | [src] |
Returns a reference to the inner transport.
pub fn protocol(&mut self) -> &mut Http | [src] |
Returns a reference to the HTTP-level configuration.
pub fn current_thread(self) -> Server<T, CurrentThread> | [src] |
Switches the backend to CurrentThread
.
pub fn start<S>(self, make_service: S) -> Result<()> where | [src] |
Starts an HTTP server using the specific MakeService
.
impl<T, A, R> Server<DefaultTransport<T, A>, R> where
T: Transport,
A: Acceptor<T::Conn>,
[src]
impl<T, A, R> Server<DefaultTransport<T, A>, R> where
T: Transport,
A: Acceptor<T::Conn>,
pub fn acceptor<A2>(self, acceptor: A2) -> Server<DefaultTransport<T, A2>, R> where | [src] |
Sets the instance of Acceptor
to the server.
By default, the raw acceptor is set, which returns the incoming I/Os directly.
pub fn sleep_on_errors(self, duration: Option<Duration>) -> Self | [src] |
Sets the time interval for sleeping on errors.
If this value is set, the incoming stream sleeps for the specific period instead of terminating, and then attemps to accept again after woken up.
The default value is Some(1sec)
.
Trait Implementations
Auto Trait Implementations
impl<T, B> Send for Server<T, B> where
B: Send,
T: Send,
impl<T, B> Send for Server<T, B> where
B: Send,
T: Send,
impl<T, B> Sync for Server<T, B> where
B: Sync,
T: Sync,
impl<T, B> Sync for Server<T, B> where
B: Sync,
T: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)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]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<T> Erased for T
impl<T> Erased for T