pub enum CacheIngestResponse {
Owned(Box<[u8]>),
Pooled(PooledBuffer),
Chunked(ChunkedResponse),
Inline(SmallVec<[u8; 128]>),
}Expand description
Owned response storage passed across the async cache ingest boundary.
Hot-path code should hand off one of these owned forms directly instead of
flattening into a fresh Vec<u8> before spawning cache work.
Variants§
Trait Implementations§
Source§impl Debug for CacheIngestResponse
impl Debug for CacheIngestResponse
Source§impl From<&[u8]> for CacheIngestResponse
impl From<&[u8]> for CacheIngestResponse
Source§impl From<ChunkedResponse> for CacheIngestResponse
impl From<ChunkedResponse> for CacheIngestResponse
Source§fn from(value: ChunkedResponse) -> Self
fn from(value: ChunkedResponse) -> Self
Converts to this type from the input type.
Source§impl From<PooledBuffer> for CacheIngestResponse
impl From<PooledBuffer> for CacheIngestResponse
Source§fn from(value: PooledBuffer) -> Self
fn from(value: PooledBuffer) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CacheIngestResponse
impl RefUnwindSafe for CacheIngestResponse
impl Send for CacheIngestResponse
impl Sync for CacheIngestResponse
impl Unpin for CacheIngestResponse
impl UnsafeUnpin for CacheIngestResponse
impl UnwindSafe for CacheIngestResponse
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more