[][src]Struct siren_types::NavigationalLink

pub struct NavigationalLink {
    pub rel: Vec<String>,
    pub class: Vec<String>,
    pub href: String,
    pub title: Option<String>,
    pub _type: Option<String>,
}

Fields

rel: Vec<String>

Defines the relationship of the link to its entity, per Web Linking (RFC5988) and Link Relations. MUST be an array of strings. Required.

class: Vec<String>

Describes aspects of the link based on the current representation. Possible values are implementation-dependent and should be documented. MUST be an array of strings. Optional.

href: String

The URI of the linked resource. Required.

title: Option<String>

Text describing the nature of a link. Optional.

_type: Option<String>

Defines media type of the linked resource, per Web Linking (RFC5988). Optional.

Implementations

impl NavigationalLink[src]

pub fn new(rels: &[impl Into<String> + Clone], href: impl Into<String>) -> Self[src]

pub fn with_class_member(self, class_member: impl Into<String>) -> Self[src]

pub fn with_type(self, _type: impl Into<String>) -> Self[src]

pub fn with_title(self, title: impl Into<String>) -> Self[src]

Trait Implementations

impl Debug for NavigationalLink[src]

impl<'de> Deserialize<'de> for NavigationalLink[src]

impl Serialize for NavigationalLink[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.