pub struct RequestScope { /* private fields */ }Expand description
Cancellation and deadline owned by exactly one handler invocation.
Implementations§
Source§impl RequestScope
impl RequestScope
Sourcepub fn child(parent: &Cancellation, deadline: Duration) -> Self
pub fn child(parent: &Cancellation, deadline: Duration) -> Self
Creates an independent request scope beneath the caller/server lifetime.
Sourcepub fn cancellation(&self) -> &Cancellation
pub fn cancellation(&self) -> &Cancellation
Returns the request cancellation observer.
Sourcepub fn cancel_timeout(&self)
pub fn cancel_timeout(&self)
Records that the injected platform clock reached the request deadline.
Sourcepub fn cancel_peer_drop(&self)
pub fn cancel_peer_drop(&self)
Records EOF or another peer-side disconnect observed by the connection adapter.
Trait Implementations§
Source§impl Clone for RequestScope
impl Clone for RequestScope
Source§fn clone(&self) -> RequestScope
fn clone(&self) -> RequestScope
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RequestScope
impl RefUnwindSafe for RequestScope
impl Send for RequestScope
impl Sync for RequestScope
impl Unpin for RequestScope
impl UnsafeUnpin for RequestScope
impl UnwindSafe for RequestScope
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