pub struct RefreshMetadata {
pub method: Method,
pub uri: Uri,
pub headers: Vec<(String, Vec<u8>)>,
}Expand description
Metadata needed to reconstruct a request for auto-refresh.
Fields§
§method: Method§uri: Uri§headers: Vec<(String, Vec<u8>)>Implementations§
Source§impl RefreshMetadata
impl RefreshMetadata
Sourcepub fn from_request<B>(req: &Request<B>) -> Self
pub fn from_request<B>(req: &Request<B>) -> Self
Creates new refresh metadata from a request.
Sourcepub fn from_request_with_headers<B>(
req: &Request<B>,
header_names: &[String],
) -> Self
pub fn from_request_with_headers<B>( req: &Request<B>, header_names: &[String], ) -> Self
Creates new refresh metadata with specific headers to store.
Sourcepub fn try_into_request(&self) -> Option<Request<()>>
pub fn try_into_request(&self) -> Option<Request<()>>
Attempts to reconstruct a request from this metadata.
Returns None if the request cannot be reconstructed (e.g., invalid URI).
Trait Implementations§
Source§impl Clone for RefreshMetadata
impl Clone for RefreshMetadata
Source§fn clone(&self) -> RefreshMetadata
fn clone(&self) -> RefreshMetadata
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 moreAuto Trait Implementations§
impl !Freeze for RefreshMetadata
impl RefUnwindSafe for RefreshMetadata
impl Send for RefreshMetadata
impl Sync for RefreshMetadata
impl Unpin for RefreshMetadata
impl UnwindSafe for RefreshMetadata
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