pub struct ResponseInfo {
pub status: u16,
pub content_location: Option<String>,
pub location: Option<String>,
pub accept_query: Vec<String>,
pub allow: Vec<String>,
}Expand description
QUERY-relevant metadata extracted from a response.
Fields§
§status: u16The response status code.
content_location: Option<String>The Content-Location field: the stored result of the query (§2.3).
location: Option<String>The Location field: the equivalent resource (§2.4).
accept_query: Vec<String>The advertised query media ranges, parsed from Accept-Query.
allow: Vec<String>The methods advertised in Allow.
Implementations§
Source§impl ResponseInfo
impl ResponseInfo
Sourcepub fn from_headers(status: u16, headers: &HeaderMap) -> Self
pub fn from_headers(status: u16, headers: &HeaderMap) -> Self
Extracts QUERY-relevant metadata from a status code and header map.
Sourcepub fn result_uri(&self) -> Option<&str>
pub fn result_uri(&self) -> Option<&str>
The URI of the stored result of the query just run (Content-Location,
RFC 10008 §2.3). A GET to this URI retrieves that result.
Sourcepub fn equivalent_resource_uri(&self) -> Option<&str>
pub fn equivalent_resource_uri(&self) -> Option<&str>
The URI of the equivalent resource for the query (Location, RFC 10008
§2.4). A GET to this URI re-runs the query for a current result.
Trait Implementations§
Source§impl Clone for ResponseInfo
impl Clone for ResponseInfo
Source§fn clone(&self) -> ResponseInfo
fn clone(&self) -> ResponseInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResponseInfo
impl RefUnwindSafe for ResponseInfo
impl Send for ResponseInfo
impl Sync for ResponseInfo
impl Unpin for ResponseInfo
impl UnsafeUnpin for ResponseInfo
impl UnwindSafe for ResponseInfo
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