Struct hyper_simple_server::ConfigurationBuilder [−][src]
Implementations
impl ConfigurationBuilder
[src]
pub fn new() -> Self
[src]
pub fn build(self) -> ServerResult<Configuration>
[src]
impl ConfigurationBuilder
[src]
pub fn with_endpoint(self, _endpoint: Endpoint) -> Self
[src]
pub fn with_endpoint_address(self, _address: EndpointAddress) -> Self
[src]
pub fn with_endpoint_socket_address(
self,
_address: impl Into<SocketAddr>
) -> Self
[src]
self,
_address: impl Into<SocketAddr>
) -> Self
pub fn with_endpoint_socket_address_parse(
self,
_address: &impl ToSocketAddrs + ?Sized
) -> ServerResult<Self>
[src]
self,
_address: &impl ToSocketAddrs + ?Sized
) -> ServerResult<Self>
pub fn with_endpoint_descriptor(self, _descriptor: u32) -> Self
[src]
pub fn with_endpoint_protocol(self, _protocol: EndpointProtocol) -> Self
[src]
pub fn with_endpoint_security(self, _security: EndpointSecurity) -> Self
[src]
impl ConfigurationBuilder
[src]
pub fn with_endpoint_certificate_rustls(
self,
_certificate: RustTlsCertificate
) -> Self
[src]
self,
_certificate: RustTlsCertificate
) -> Self
pub fn with_endpoint_certificate_rustls_from_pem_file(
self,
_path: impl AsRef<Path>
) -> ServerResult<Self>
[src]
self,
_path: impl AsRef<Path>
) -> ServerResult<Self>
pub fn with_endpoint_certificate_rustls_from_pem_data(
self,
_data: impl AsRef<[u8]>
) -> ServerResult<Self>
[src]
self,
_data: impl AsRef<[u8]>
) -> ServerResult<Self>
impl ConfigurationBuilder
[src]
pub fn with_endpoint_certificate_native(
self,
_certificate: NativeTlsCertificate
) -> Self
[src]
self,
_certificate: NativeTlsCertificate
) -> Self
pub fn with_endpoint_certificate_native_from_pkcs12_file(
self,
_path: impl AsRef<Path>,
_password: &str
) -> ServerResult<Self>
[src]
self,
_path: impl AsRef<Path>,
_password: &str
) -> ServerResult<Self>
pub fn with_endpoint_certificate_native_from_pkcs12_data(
self,
_data: impl AsRef<[u8]>,
_password: &str
) -> ServerResult<Self>
[src]
self,
_data: impl AsRef<[u8]>,
_password: &str
) -> ServerResult<Self>
impl ConfigurationBuilder
[src]
pub fn with_handler<H, F, RB>(self, _handler: H) -> Self where
H: Handler<Future = F, ResponseBody = RB, ResponseBodyError = RB::Error> + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
H: Handler<Future = F, ResponseBody = RB, ResponseBodyError = RB::Error> + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_handler_fn_sync<I, C, RB>(self, _handler: I) -> Self where
I: Into<HandlerFnSync<C, RB>>,
C: Fn(Request<Body>) -> ServerResult<Response<RB>> + Send + Sync + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
I: Into<HandlerFnSync<C, RB>>,
C: Fn(Request<Body>) -> ServerResult<Response<RB>> + Send + Sync + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_handler_fn_async<I, C, F, RB>(self, _handler: I) -> Self where
I: Into<HandlerFnAsync<C, F, RB>>,
C: Fn(Request<Body>) -> F + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
I: Into<HandlerFnAsync<C, F, RB>>,
C: Fn(Request<Body>) -> F + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_handler_dyn<H>(self, _handler: H) -> Self where
H: HandlerDyn,
[src]
H: HandlerDyn,
pub fn with_handler_arc<I>(self, _handler: I) -> Self where
I: Into<HandlerDynArc>,
[src]
I: Into<HandlerDynArc>,
impl ConfigurationBuilder
[src]
pub fn with_route<'a, P, H, F, RB>(self, _paths: P, _handler: H) -> Self where
P: Into<RoutePaths<'a>>,
H: Handler<Future = F, ResponseBody = RB, ResponseBodyError = RB::Error> + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
P: Into<RoutePaths<'a>>,
H: Handler<Future = F, ResponseBody = RB, ResponseBodyError = RB::Error> + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_route_fn_sync<'a, P, I, C, RB>(self, _paths: P, _handler: I) -> Self where
P: Into<RoutePaths<'a>>,
I: Into<HandlerFnSync<C, RB>>,
C: Fn(Request<Body>) -> ServerResult<Response<RB>> + Send + Sync + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
P: Into<RoutePaths<'a>>,
I: Into<HandlerFnSync<C, RB>>,
C: Fn(Request<Body>) -> ServerResult<Response<RB>> + Send + Sync + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_route_fn_async<'a, P, I, C, F, RB>(
self,
_paths: P,
_handler: I
) -> Self where
P: Into<RoutePaths<'a>>,
I: Into<HandlerFnAsync<C, F, RB>>,
C: Fn(Request<Body>) -> F + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
[src]
self,
_paths: P,
_handler: I
) -> Self where
P: Into<RoutePaths<'a>>,
I: Into<HandlerFnAsync<C, F, RB>>,
C: Fn(Request<Body>) -> F + Send + Sync + 'static,
F: Future<Output = ServerResult<Response<RB>>> + Send + 'static,
RB: BodyTrait<Data = Bytes> + Send + 'static,
RB::Error: Error + Send + Sync + 'static,
pub fn with_route_dyn<'a, P, H>(self, _paths: P, _handler: H) -> Self where
H: HandlerDyn,
P: Into<RoutePaths<'a>>,
[src]
H: HandlerDyn,
P: Into<RoutePaths<'a>>,
pub fn with_route_arc<'a, P, I>(self, _paths: P, _handler: I) -> Self where
I: Into<HandlerDynArc>,
P: Into<RoutePaths<'a>>,
[src]
I: Into<HandlerDynArc>,
P: Into<RoutePaths<'a>>,
pub fn with_routes(self, _routes: impl Into<Routes>) -> Self
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ConfigurationBuilder
impl Send for ConfigurationBuilder
impl Sync for ConfigurationBuilder
impl Unpin for ConfigurationBuilder
impl !UnwindSafe for ConfigurationBuilder
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, 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>,