pub struct AccessSink { /* private fields */ }Expand description
Holds records back until the response they describe actually exists.
A handler knows what it produced; it does not know what was sent. Response compression runs after the handler returns, so a record emitted there can only ever report the uncompressed body — which is the wrong number for anything that costs money. A transport that can measure the final body installs a sink here, hooks defer into it, and the transport drains it once the body is final. A transport that installs no sink gets inline emission, so the immediate-vs-deferred choice is made in exactly one place.
Implementations§
Trait Implementations§
Source§impl Clone for AccessSink
impl Clone for AccessSink
Source§fn clone(&self) -> AccessSink
fn clone(&self) -> AccessSink
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 moreSource§impl Debug for AccessSink
impl Debug for AccessSink
Source§impl Default for AccessSink
impl Default for AccessSink
Source§fn default() -> AccessSink
fn default() -> AccessSink
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AccessSink
impl RefUnwindSafe for AccessSink
impl Send for AccessSink
impl Sync for AccessSink
impl Unpin for AccessSink
impl UnsafeUnpin for AccessSink
impl UnwindSafe for AccessSink
Blanket Implementations§
impl<T> Allocation for T
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