pub struct AsgiHandler { /* private fields */ }
Implementations
sourceimpl AsgiHandler
impl AsgiHandler
pub fn new(app: PyObject, dispatcher: PythonDispatcher) -> AsgiHandler
Trait Implementations
sourceimpl Clone for AsgiHandler
impl Clone for AsgiHandler
sourcefn clone(&self) -> AsgiHandler
fn clone(&self) -> AsgiHandler
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<S> Handler<AsgiHandler, S, Body> for AsgiHandler
impl<S> Handler<AsgiHandler, S, Body> for AsgiHandler
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.
sourcefn call(self, req: Request<Body>, _state: Arc<S>) -> Self::Future
fn call(self, req: Request<Body>, _state: Arc<S>) -> Self::Future
Call the handler with the given request.
sourcefn layer<L>(self, layer: L) -> Layered<L, Self, T, S, B>where
L: Layer<WithState<Self, T, S, B>> + Clone,
fn layer<L>(self, layer: L) -> Layered<L, Self, T, S, B>where
L: Layer<WithState<Self, T, S, B>> + Clone,
Apply a
tower::Layer
to the handler. Read moresourcefn with_state(self, state: S) -> WithState<Self, T, S, B>
fn with_state(self, state: S) -> WithState<Self, T, S, B>
Convert the handler into a
Service
by providing the statesourcefn with_state_arc(self, state: Arc<S>) -> WithState<Self, T, S, B>
fn with_state_arc(self, state: Arc<S>) -> WithState<Self, T, S, B>
Convert the handler into a
Service
by providing the stateAuto Trait Implementations
impl !RefUnwindSafe for AsgiHandler
impl Send for AsgiHandler
impl Sync for AsgiHandler
impl Unpin for AsgiHandler
impl !UnwindSafe for AsgiHandler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FromRef<T> for Twhere
T: Clone,
impl<T> FromRef<T> for Twhere
T: Clone,
sourceimpl<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>,
sourcefn into_service(self) -> WithState<H, T, (), B>
fn into_service(self) -> WithState<H, T, (), B>
Convert the handler into a
Service
and no state.sourcefn into_make_service(self) -> IntoMakeService<IntoService<H, T, (), B>>
fn into_make_service(self) -> IntoMakeService<IntoService<H, T, (), B>>
Convert the handler into a
MakeService
and no state. Read moresourcefn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<IntoService<H, T, (), B>, C>
fn into_make_service_with_connect_info<C>(
self
) -> IntoMakeServiceWithConnectInfo<IntoService<H, T, (), B>, C>
Convert the handler into a
MakeService
which stores information
about the incoming connection and has no state. Read more