Struct hyper_simple_server::Server [−][src]
Implementations
impl Server
[src]
pub fn new(_configuration: Configuration) -> ServerResult<Self>
[src]
impl Server
[src]
pub fn run_and_wait(_configuration: Configuration) -> ServerResult
[src]
pub async fn run(_configuration: Configuration) -> ServerResult
[src]
pub fn serve_and_wait(&self) -> ServerResult
[src]
pub async fn serve(&self) -> ServerResult
[src]
impl Server
[src]
pub fn run_and_wait_with_handler<H, F>(
_configuration: Configuration,
_handler: H
) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
[src]
_configuration: Configuration,
_handler: H
) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
pub async fn run_with_handler<H, F>(
_configuration: Configuration,
_handler: H
) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
[src]
_configuration: Configuration,
_handler: H
) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
pub fn serve_and_wait_with_handler<H, F>(&self, _handler: H) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
[src]
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
pub async fn serve_with_handler<H, F>(&self, _handler: H) -> ServerResult where
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
[src]
H: Handler<Future = F> + Send + Sync + 'static + Clone,
F: Future<Output = ServerResult<Response<H::ResponseBody>>> + Send + 'static,
impl Server
[src]
pub fn serve_builder(&self) -> ServerResult<Builder<Accepter, ServerExecutor>>
[src]
pub async fn serve_with_service_fn<S, SE, SF, SB, SBD, SBE>(
&self,
_service: S
) -> ServerResult where
S: FnMut(Request<Body>) -> SF + Send + 'static + Clone,
SE: Error + Send + Sync + 'static,
SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
SBD: Buf + Send + 'static,
SBE: Error + Send + Sync + 'static,
[src]
&self,
_service: S
) -> ServerResult where
S: FnMut(Request<Body>) -> SF + Send + 'static + Clone,
SE: Error + Send + Sync + 'static,
SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
SBD: Buf + Send + 'static,
SBE: Error + Send + Sync + 'static,
pub async fn serve_with_make_service_fn<M, MF, ME, S, SF, SE, SB, SBD, SBE>(
&self,
_make_service: M
) -> ServerResult where
M: FnMut(&Connection) -> MF + Send + 'static,
MF: Future<Output = Result<S, ME>> + Send + 'static,
ME: Error + Send + Sync + 'static,
S: Service<Request<Body>, Response = Response<SB>, Future = SF, Error = SE> + Send + 'static,
SE: Error + Send + Sync + 'static,
SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
SBD: Buf + Send + 'static,
SBE: Error + Send + Sync + 'static,
[src]
&self,
_make_service: M
) -> ServerResult where
M: FnMut(&Connection) -> MF + Send + 'static,
MF: Future<Output = Result<S, ME>> + Send + 'static,
ME: Error + Send + Sync + 'static,
S: Service<Request<Body>, Response = Response<SB>, Future = SF, Error = SE> + Send + 'static,
SE: Error + Send + Sync + 'static,
SF: Future<Output = Result<Response<SB>, SE>> + Send + 'static,
SB: BodyTrait<Data = SBD, Error = SBE> + Send + 'static,
SBD: Buf + Send + 'static,
SBE: Error + Send + Sync + 'static,
pub fn serve_protocol(&self) -> ServerResult<Http>
[src]
pub fn serve_runtime(&self) -> ServerResult<Runtime>
[src]
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Server
impl Send for Server
impl Sync for Server
impl Unpin for Server
impl UnwindSafe for Server
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,