pub enum BlobBody {
Cached(Bytes),
Mapped(Bytes),
Stream(GetObject),
}Expand description
A blob body to serve: a cached, in-memory buffer (small hot assets) or a streaming handle straight from storage (everything else).
Variants§
Cached(Bytes)
A small blob served from the in-memory cache as one refcounted frame.
Mapped(Bytes)
A large blob served as one borrowed frame backed by a memory-mapped local
file — no tokio::fs double-buffer copy, and a single content-length body
instead of a chunked stream. Only local-file backends produce this.
Stream(GetObject)
A blob streamed from storage (too large to cache, or Range/large path).
Auto Trait Implementations§
impl !Freeze for BlobBody
impl !RefUnwindSafe for BlobBody
impl !Sync for BlobBody
impl !UnwindSafe for BlobBody
impl Send for BlobBody
impl Unpin for BlobBody
impl UnsafeUnpin for BlobBody
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