Struct http_halforms::Link

source ·
pub struct Link {
    pub href: String,
    pub templated: bool,
    pub type: Option<String>,
    pub deprecation: Option<String>,
    pub name: Option<String>,
    pub profile: Option<String>,
    pub title: Option<String>,
    pub hreflang: Option<String>,
}
Expand description

Representation of a single Link in a HAL document.

Fields§

§href: String§templated: bool§type: Option<String>§deprecation: Option<String>§name: Option<String>§profile: Option<String>§title: Option<String>§hreflang: Option<String>

Implementations§

Create a new Link with the given href.

Examples found in repository?
src/hal/link.rs (line 122)
121
122
123
    fn from(href: S) -> Self {
        Self::new(href.to_string())
    }

Indicate that the link is templated.

Specify the type value on the link.

Specify the deprecation value on the link.

Specify the name value on the link.

Specify the profile value on the link.

Specify the title value on the link.

Specify the hreflang value on the link.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts to this type from the input type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.