pub struct VaryHxRequest;Expand description
The Vary: HX-Request header.
You may want to add this header to the response if your handler responds
differently based on the HX-Request request header.
For example, if your server renders the full HTML when the HX-Request
header is missing or false, and it renders a fragment of that HTML when
HX-Request: true.
You probably need this only for GET requests, as other HTTP methods are
not cached by default.
See https://htmx.org/docs/#caching for more information.
Trait Implementations§
Source§impl Clone for VaryHxRequest
impl Clone for VaryHxRequest
Source§fn clone(&self) -> VaryHxRequest
fn clone(&self) -> VaryHxRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 VaryHxRequest
impl Debug for VaryHxRequest
Source§impl IntoResponseParts for VaryHxRequest
impl IntoResponseParts for VaryHxRequest
Source§fn into_response_parts(
self,
res: ResponseParts,
) -> Result<ResponseParts, Self::Error>
fn into_response_parts( self, res: ResponseParts, ) -> Result<ResponseParts, Self::Error>
Set parts of the response
Auto Trait Implementations§
impl Freeze for VaryHxRequest
impl RefUnwindSafe for VaryHxRequest
impl Send for VaryHxRequest
impl Sync for VaryHxRequest
impl Unpin for VaryHxRequest
impl UnwindSafe for VaryHxRequest
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