pub struct Link {
pub id: Option<Url>,
pub kind: OneOrMany<String>,
pub href: Option<Url>,
pub rel: Option<OneOrMany<String>>,
pub media_type: Option<String>,
pub name: Option<String>,
pub name_map: Option<BTreeMap<String, String>>,
pub hreflang: Option<String>,
pub height: Option<u64>,
pub width: Option<u64>,
pub preview: Option<Box<ObjectRef>>,
pub extra: BTreeMap<String, Value>,
}Expand description
Fields§
§id: Option<Url>Optional identifier for this link object.
kind: OneOrMany<String>Type of this link. Defaults to "Link".
href: Option<Url>The target URL referenced by this link.
rel: Option<OneOrMany<String>>Link relation types (RFC 5988).
media_type: Option<String>MIME type of the referenced resource.
name: Option<String>Plain-text display name for the link.
name_map: Option<BTreeMap<String, String>>Localized display names keyed by BCP-47 language tag.
hreflang: Option<String>BCP-47 language tag describing the language of the referenced resource.
height: Option<u64>Display height for media links.
width: Option<u64>Display width for media links.
preview: Option<Box<ObjectRef>>Preview resource associated with the link target.
extra: BTreeMap<String, Value>Additional or extension properties preserved verbatim across (de)serialization.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Link
impl<'de> Deserialize<'de> for Link
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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