pub struct LinkHints {
pub allow: Vec<String>,
pub formats: BTreeMap<String, LinkHintFormat>,
pub accept_post: BTreeMap<String, LinkHintFormat>,
pub accept_patch: Vec<String>,
pub accept_ranges: Vec<String>,
pub accept_prefer: Vec<String>,
pub precondition_req: Vec<String>,
pub auth_schemes: Vec<LinkHintAuthSchemes>,
pub status: Option<String>,
}Expand description
Representation of Link Hints from draft-ietf-httpapi-link-hint-01
Fields§
§allow: Vec<String>§formats: BTreeMap<String, LinkHintFormat>§accept_post: BTreeMap<String, LinkHintFormat>§accept_patch: Vec<String>§accept_ranges: Vec<String>§accept_prefer: Vec<String>§precondition_req: Vec<String>§auth_schemes: Vec<LinkHintAuthSchemes>§status: Option<String>Implementations§
Source§impl LinkHints
impl LinkHints
Sourcepub fn with_allow<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_allow<S>(self, value: S) -> Selfwhere
S: ToString,
Specify an allow value.
Sourcepub fn with_format<S, V>(self, format: S, value: V) -> Self
pub fn with_format<S, V>(self, format: S, value: V) -> Self
Specify a format value.
Sourcepub fn with_accept_post<S, V>(self, format: S, value: V) -> Self
pub fn with_accept_post<S, V>(self, format: S, value: V) -> Self
Specify an accept-post value.
Sourcepub fn with_accept_patch<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_accept_patch<S>(self, value: S) -> Selfwhere
S: ToString,
Specify an accept-patch value.
Sourcepub fn with_accept_range<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_accept_range<S>(self, value: S) -> Selfwhere
S: ToString,
Specify an accept-range value.
Sourcepub fn with_accept_prefer<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_accept_prefer<S>(self, value: S) -> Selfwhere
S: ToString,
Specify an accept-prefer value.
Sourcepub fn with_precondition_req<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_precondition_req<S>(self, value: S) -> Selfwhere
S: ToString,
Specify a precondition-req value.
Sourcepub fn with_precondition_req_etag(self) -> Self
pub fn with_precondition_req_etag(self) -> Self
Specify a precondition-req value of “etag”.
Sourcepub fn with_precondition_req_last_modified(self) -> Self
pub fn with_precondition_req_last_modified(self) -> Self
Specify a precondition-req value of “last-modified”.
Sourcepub fn with_auth_scheme<V>(self, value: V) -> Selfwhere
V: Into<LinkHintAuthSchemes>,
pub fn with_auth_scheme<V>(self, value: V) -> Selfwhere
V: Into<LinkHintAuthSchemes>,
Specify an auth-scheme value.
Sourcepub fn with_status<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_status<S>(self, value: S) -> Selfwhere
S: ToString,
Specify a status value.
Sourcepub fn with_status_deprecated(self) -> Self
pub fn with_status_deprecated(self) -> Self
Specify a status value of “deprecated”.
Sourcepub fn with_status_gone(self) -> Self
pub fn with_status_gone(self) -> Self
Specify a status value of “gone”.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkHints
impl RefUnwindSafe for LinkHints
impl Send for LinkHints
impl Sync for LinkHints
impl Unpin for LinkHints
impl UnwindSafe for LinkHints
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