pub enum BeforeRequest {
Fresh(Parts),
Stale {
request: Parts,
matches: bool,
},
}
Expand description
Next action suggested after before_request()
Variants§
Fresh(Parts)
Good news! You can use it with body from the cache. No need to contact the server.
Stale
Fields
You must send the request to the server first.
Implementations§
source§impl BeforeRequest
impl BeforeRequest
sourcepub fn satisfies_without_revalidation(&self) -> bool
pub fn satisfies_without_revalidation(&self) -> bool
For backwards compatibility only.
Don’t forget to use request headers from BeforeRequest::Fresh
Auto Trait Implementations§
impl !Freeze for BeforeRequest
impl !RefUnwindSafe for BeforeRequest
impl Send for BeforeRequest
impl Sync for BeforeRequest
impl Unpin for BeforeRequest
impl !UnwindSafe for BeforeRequest
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