pub struct LinkValue { /* private fields */ }
Expand description
A single link-value
of a Link
header, based on:
RFC5988
Implementations§
Source§impl LinkValue
impl LinkValue
Sourcepub fn rel(&self) -> Option<&[RelationType]>
pub fn rel(&self) -> Option<&[RelationType]>
Get the LinkValue
’s rel
parameter(s).
Sourcepub fn rev(&self) -> Option<&[RelationType]>
pub fn rev(&self) -> Option<&[RelationType]>
Get the LinkValue
’s rev
parameter(s).
Sourcepub fn href_lang(&self) -> Option<&[LanguageTag]>
pub fn href_lang(&self) -> Option<&[LanguageTag]>
Get the LinkValue
’s hreflang
parameter(s).
Sourcepub fn media_desc(&self) -> Option<&[MediaDesc]>
pub fn media_desc(&self) -> Option<&[MediaDesc]>
Get the LinkValue
’s media
parameter(s).
Sourcepub fn title_star(&self) -> Option<&str>
pub fn title_star(&self) -> Option<&str>
Get the LinkValue
’s title*
parameter.
Sourcepub fn media_type(&self) -> Option<&Mime>
pub fn media_type(&self) -> Option<&Mime>
Get the LinkValue
’s type
parameter.
Sourcepub fn push_rel(self, rel: RelationType) -> LinkValue
pub fn push_rel(self, rel: RelationType) -> LinkValue
Add a RelationType
to the LinkValue
’s rel
parameter.
Sourcepub fn set_anchor<T: Into<String>>(self, anchor: T) -> LinkValue
pub fn set_anchor<T: Into<String>>(self, anchor: T) -> LinkValue
Set LinkValue
’s anchor
parameter.
Sourcepub fn push_rev(self, rev: RelationType) -> LinkValue
pub fn push_rev(self, rev: RelationType) -> LinkValue
Add a RelationType
to the LinkValue
’s rev
parameter.
Sourcepub fn push_href_lang(self, language_tag: LanguageTag) -> LinkValue
pub fn push_href_lang(self, language_tag: LanguageTag) -> LinkValue
Add a LanguageTag
to the LinkValue
’s hreflang
parameter.
Sourcepub fn push_media_desc(self, media_desc: MediaDesc) -> LinkValue
pub fn push_media_desc(self, media_desc: MediaDesc) -> LinkValue
Add a MediaDesc
to the LinkValue
’s media_desc
parameter.
Sourcepub fn set_title<T: Into<String>>(self, title: T) -> LinkValue
pub fn set_title<T: Into<String>>(self, title: T) -> LinkValue
Set LinkValue
’s title
parameter.
Sourcepub fn set_title_star<T: Into<String>>(self, title_star: T) -> LinkValue
pub fn set_title_star<T: Into<String>>(self, title_star: T) -> LinkValue
Set LinkValue
’s title*
parameter.
Sourcepub fn set_media_type(self, media_type: Mime) -> LinkValue
pub fn set_media_type(self, media_type: Mime) -> LinkValue
Set LinkValue
’s type
parameter.
Trait Implementations§
impl StructuralPartialEq for LinkValue
Auto Trait Implementations§
impl Freeze for LinkValue
impl RefUnwindSafe for LinkValue
impl Send for LinkValue
impl Sync for LinkValue
impl Unpin for LinkValue
impl UnwindSafe for LinkValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)