pub struct LinkValue { /* private fields */ }
Expand description
A single link-value
of a Link
header, based on:
RFC5988
Implementations
sourceimpl LinkValue
impl LinkValue
sourcepub fn new<T>(uri: T) -> LinkValue where
T: Into<Cow<'static, str>>,
pub fn new<T>(uri: T) -> LinkValue where
T: Into<Cow<'static, str>>,
Create LinkValue
from URI-Reference.
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 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<Vec<(Attr, Value), Global>>>
pub fn media_type(&self) -> Option<&Mime<Vec<(Attr, Value), Global>>>
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>(self, anchor: T) -> LinkValue where
T: Into<String>,
pub fn set_anchor<T>(self, anchor: T) -> LinkValue where
T: Into<String>,
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>(self, title: T) -> LinkValue where
T: Into<String>,
pub fn set_title<T>(self, title: T) -> LinkValue where
T: Into<String>,
Set LinkValue
’s title
parameter.
sourcepub fn set_title_star<T>(self, title_star: T) -> LinkValue where
T: Into<String>,
pub fn set_title_star<T>(self, title_star: T) -> LinkValue where
T: Into<String>,
Set LinkValue
’s title*
parameter.
Trait Implementations
impl StructuralPartialEq for LinkValue
Auto Trait Implementations
impl RefUnwindSafe for LinkValue
impl Send for LinkValue
impl Sync for LinkValue
impl Unpin for LinkValue
impl UnwindSafe for LinkValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more