#[non_exhaustive]pub struct FallbackHandler {
pub linode_api_http_client: LinodeApiHttpClient,
pub version: Version,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.linode_api_http_client: LinodeApiHttpClient
§version: Version
Implementations§
source§impl FallbackHandler
impl FallbackHandler
pub fn new(linode_api_http_client: LinodeApiHttpClient, version: Version) -> Self
Trait Implementations§
source§impl Clone for FallbackHandler
impl Clone for FallbackHandler
source§fn clone(&self) -> FallbackHandler
fn clone(&self) -> FallbackHandler
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FallbackHandler
impl Debug for FallbackHandler
source§impl<T, S> Handler<T, S, Body> for FallbackHandler
impl<T, S> Handler<T, S, Body> for FallbackHandler
§type Future = Pin<Box<dyn Future<Output = Response<UnsyncBoxBody<Bytes, Error>>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = Response<UnsyncBoxBody<Bytes, Error>>> + Send + 'static, Global>>
The type of future calling this handler returns.
source§fn call(self, req: Request<Body>, _state: S) -> Self::Future
fn call(self, req: Request<Body>, _state: S) -> Self::Future
Call the handler with the given request.
source§fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where
L: Layer<HandlerService<Self, T, S, B>> + Clone,
<L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
fn layer<L, NewReqBody>(self, layer: L) -> Layered<L, Self, T, S, B, NewReqBody>where L: Layer<HandlerService<Self, T, S, B>> + Clone, <L as Layer<HandlerService<Self, T, S, B>>>::Service: Service<Request<NewReqBody>>,
Apply a [
tower::Layer
] to the handler. Read moresource§fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
fn with_state(self, state: S) -> HandlerService<Self, T, S, B>
Convert the handler into a [
Service
] by providing the stateAuto Trait Implementations§
impl !RefUnwindSafe for FallbackHandler
impl Send for FallbackHandler
impl Sync for FallbackHandler
impl Unpin for FallbackHandler
impl !UnwindSafe for FallbackHandler
Blanket Implementations§
source§impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere
H: Handler<T, (), B>,
impl<H, T, B> HandlerWithoutStateExt<T, B> for Hwhere H: Handler<T, (), B>,
source§fn into_service(self) -> HandlerService<H, T, (), B>
fn into_service(self) -> HandlerService<H, T, (), B>
Convert the handler into a [
Service
] and no state.source§fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
fn into_make_service(self) -> IntoMakeService<HandlerService<H, T, (), B>>
Convert the handler into a
MakeService
and no state. Read moresource§fn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, (), B>, C>
fn into_make_service_with_connect_info<C>( self ) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, (), B>, C>
Convert the handler into a
MakeService
which stores information
about the incoming connection and has no state. Read more