pub struct Ctx<'a, Svc: ?Sized, St = ()> { /* private fields */ }Implementations§
Source§impl<'a, Svc, St> Ctx<'a, Svc, St>
impl<'a, Svc, St> Ctx<'a, Svc, St>
Sourcepub async fn ready<S, Req>(&self, svc: &'a S) -> Result<(), S::Error>where
S: Service<St, Req>,
pub async fn ready<S, Req>(&self, svc: &'a S) -> Result<(), S::Error>where
S: Service<St, Req>,
Returns when the service is able to process requests.
Sourcepub async fn call<S, Req>(
&self,
svc: &'a S,
req: Req,
) -> Result<S::Res, S::Error>where
S: Service<St, Req>,
pub async fn call<S, Req>(
&self,
svc: &'a S,
req: Req,
) -> Result<S::Res, S::Error>where
S: Service<St, Req>,
Wait for service readiness and then call service
Sourcepub async fn call_nowait<S, Req>(
&self,
svc: &'a S,
req: Req,
) -> Result<S::Res, S::Error>where
S: Service<St, Req>,
pub async fn call_nowait<S, Req>(
&self,
svc: &'a S,
req: Req,
) -> Result<S::Res, S::Error>where
S: Service<St, Req>,
Call service, do not check service readiness
Sourcepub async fn poll_fn<F, R>(&'a self, f: F) -> R
pub async fn poll_fn<F, R>(&'a self, f: F) -> R
Execute a closure until completion with the dispatcher’s task Context.
Trait Implementations§
impl<S, St> Copy for Ctx<'_, S, St>
Auto Trait Implementations§
impl<'a, Svc, St = ()> !RefUnwindSafe for Ctx<'a, Svc, St>
impl<'a, Svc, St = ()> !Send for Ctx<'a, Svc, St>
impl<'a, Svc, St = ()> !Sync for Ctx<'a, Svc, St>
impl<'a, Svc, St = ()> !UnwindSafe for Ctx<'a, Svc, St>
impl<'a, Svc, St> Freeze for Ctx<'a, Svc, St>
impl<'a, Svc, St> Unpin for Ctx<'a, Svc, St>
impl<'a, Svc, St> UnsafeUnpin for Ctx<'a, Svc, St>
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