[−][src]Struct carapax::prelude::WebhookServiceFactory
Creates a webhook service
Methods
impl<H> WebhookServiceFactory<H>
[src]
pub fn new<S>(path: S, update_handler: H) -> WebhookServiceFactory<H> where
S: Into<String>,
[src]
S: Into<String>,
Creates a new factory
Trait Implementations
impl<Ctx, H> MakeService<Ctx> for WebhookServiceFactory<H> where
H: UpdateHandler + Send + Sync + 'static,
[src]
H: UpdateHandler + Send + Sync + 'static,
type ReqBody = Body
The Payload
body of the http::Request
.
type ResBody = Body
The Payload
body of the http::Response
.
type Error = Error
The error type that can be returned by Service
s.
type Service = WebhookService<H>
The resolved Service
from new_service()
.
type Future = Box<dyn Future<Error = <WebhookServiceFactory<H> as MakeService<Ctx>>::MakeError, Item = <WebhookServiceFactory<H> as MakeService<Ctx>>::Service> + 'static + Send>
The future returned from new_service
of a Service
.
type MakeError = WebhookServiceFactoryError
The error type that can be returned when creating a new Service
.
fn make_service(
&mut self,
_ctx: Ctx
) -> <WebhookServiceFactory<H> as MakeService<Ctx>>::Future
[src]
&mut self,
_ctx: Ctx
) -> <WebhookServiceFactory<H> as MakeService<Ctx>>::Future
fn poll_ready(&mut self) -> Result<Async<()>, Self::MakeError>
[src]
Returns Ready
when the constructor is ready to create a new Service
. Read more
Auto Trait Implementations
impl<H> Send for WebhookServiceFactory<H> where
H: Send,
H: Send,
impl<H> Sync for WebhookServiceFactory<H> where
H: Send,
H: Send,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
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> 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>,
type Error = <U as TryFrom<T>>::Error
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]
T: 'static + ?Sized,
impl<N, Ctx> MakeService for N where
N: NewService,
[src]
N: NewService,
type ReqBody = <N as NewService>::ReqBody
The Payload
body of the http::Request
.
type ResBody = <N as NewService>::ResBody
The Payload
body of the http::Response
.
type Error = <N as NewService>::Error
The error type that can be returned by Service
s.
type Service = <N as NewService>::Service
The resolved Service
from new_service()
.
type Future = <N as NewService>::Future
The future returned from new_service
of a Service
.
type MakeError = <N as NewService>::InitError
The error type that can be returned when creating a new Service
.
fn poll_ready(
&mut self
) -> Result<Async<()>, <N as MakeService<Ctx>>::MakeError>
[src]
&mut self
) -> Result<Async<()>, <N as MakeService<Ctx>>::MakeError>