pub struct NewEndpointService<E> { /* private fields */ }Expand description
A factory of HTTP service which wraps an Endpoint.
Implementations§
Source§impl<E> NewEndpointService<E>
impl<E> NewEndpointService<E>
Sourcepub fn new(endpoint: E) -> NewEndpointService<E>
pub fn new(endpoint: E) -> NewEndpointService<E>
Create a new NewEndpointService from an endpoint.
Sourcepub fn set_error_handler(&mut self, handler: ErrorHandler)
pub fn set_error_handler(&mut self, handler: ErrorHandler)
Set the error handler used in this service.
Trait Implementations§
Source§impl<E: Debug> Debug for NewEndpointService<E>
impl<E: Debug> Debug for NewEndpointService<E>
Source§impl<E> NewHttpService for NewEndpointService<E>
impl<E> NewHttpService for NewEndpointService<E>
Source§type RequestBody = RequestBody
type RequestBody = RequestBody
The type of message body in the request.
Source§type ResponseBody = ResponseBody
type ResponseBody = ResponseBody
The type of message body in the response.
Source§type Service = EndpointService<E>
type Service = EndpointService<E>
The type of
HttpService to be created by this factory.Source§type Future = FutureResult<<NewEndpointService<E> as NewHttpService>::Service, <NewEndpointService<E> as NewHttpService>::InitError>
type Future = FutureResult<<NewEndpointService<E> as NewHttpService>::Service, <NewEndpointService<E> as NewHttpService>::InitError>
A
Future which will be returned from new_service and resolved as a Service.Source§fn new_service(&self) -> Self::Future
fn new_service(&self) -> Self::Future
Create a new instance of
HttpService asynchronously.Auto Trait Implementations§
impl<E> Freeze for NewEndpointService<E>
impl<E> RefUnwindSafe for NewEndpointService<E>where
E: RefUnwindSafe,
impl<E> Send for NewEndpointService<E>
impl<E> Sync for NewEndpointService<E>
impl<E> Unpin for NewEndpointService<E>
impl<E> UnwindSafe for NewEndpointService<E>where
E: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more