pub struct Discovery {
pub supports_query: bool,
pub allow: Vec<String>,
pub accept_query: Vec<String>,
}Expand description
A server’s advertised support for the QUERY method.
Fields§
§supports_query: boolWhether the response advertises QUERY (via Allow or Accept-Query).
allow: Vec<String>The methods advertised in Allow.
accept_query: Vec<String>The advertised query media ranges, parsed from Accept-Query.
Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn from_headers(headers: &HeaderMap) -> Self
pub fn from_headers(headers: &HeaderMap) -> Self
Interprets a response’s header fields as QUERY support metadata.
Sourcepub fn accepts_media_type(&self, media_type: &str) -> bool
pub fn accepts_media_type(&self, media_type: &str) -> bool
Reports whether media_type is covered by the advertised Accept-Query
media ranges, honoring the */* and type/* wildcards.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Discovery
impl RefUnwindSafe for Discovery
impl Send for Discovery
impl Sync for Discovery
impl Unpin for Discovery
impl UnsafeUnpin for Discovery
impl UnwindSafe for Discovery
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