pub enum Body<F = TokioFileAccess> {
Empty,
Full(FileBytesStream<F>),
Range(FileBytesStreamRange<F>),
MultiRange(FileBytesStreamMultiRange<F>),
}
Expand description
Hyper Body implementation for the various types of streams used in static serving.
Variants§
Empty
No response body.
Full(FileBytesStream<F>)
Serve a complete file.
Range(FileBytesStreamRange<F>)
Serve a range from a file.
MultiRange(FileBytesStreamMultiRange<F>)
Serve multiple ranges from a file.
Trait Implementations§
Source§impl<F: FileAccess> Body for Body<F>
impl<F: FileAccess> Body for Body<F>
Auto Trait Implementations§
impl<F> Freeze for Body<F>where
F: Freeze,
impl<F> RefUnwindSafe for Body<F>where
F: RefUnwindSafe,
impl<F> Send for Body<F>where
F: Send,
impl<F> Sync for Body<F>where
F: Sync,
impl<F> Unpin for Body<F>where
F: Unpin,
impl<F> UnwindSafe for Body<F>where
F: UnwindSafe,
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