pub struct Ranged<B: RangeBody + Send + 'static> { /* private fields */ }
Expand description
The main responder type. Implements IntoResponse
.
Implementations§
Source§impl<B: RangeBody + Send + 'static> Ranged<B>
impl<B: RangeBody + Send + 'static> Ranged<B>
Sourcepub fn try_respond(self) -> Result<RangedResponse<B>, RangeNotSatisfiable>
pub fn try_respond(self) -> Result<RangedResponse<B>, RangeNotSatisfiable>
Responds to the request, returning headers and body as
RangedResponse
. Returns RangeNotSatisfiable
error if requested
range in header was not satisfiable.
Trait Implementations§
Source§impl<B: RangeBody + Send + 'static> IntoResponse for Ranged<B>
impl<B: RangeBody + Send + 'static> IntoResponse for Ranged<B>
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl<B> !Freeze for Ranged<B>
impl<B> RefUnwindSafe for Ranged<B>where
B: RefUnwindSafe,
impl<B> Send for Ranged<B>
impl<B> Sync for Ranged<B>where
B: Sync,
impl<B> Unpin for Ranged<B>where
B: Unpin,
impl<B> UnwindSafe for Ranged<B>where
B: 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