Skip to main content

MetadataLinkItem

Struct MetadataLinkItem 

Source
pub struct MetadataLinkItem {
    pub href: String,
    pub rel: String,
    pub hreflang: Option<String>,
    pub id: Option<String>,
    pub mime: Option<String>,
    pub properties: Option<String>,
    pub refines: Option<String>,
}
Expand description

Represents a metadata link item in an EPUB publication

The MetadataLinkItem structure represents a link from the publication’s metadata to external resources. These links are typically used to associate the publication with external records, alternate editions, or related resources.

Link metadata items are defined in the OPF file using <link> elements in the metadata section and follow the EPUB 3.0 metadata link specification.

Fields§

§href: String

The URI of the linked resource

§rel: String

The relationship between this publication and the linked resource

§hreflang: Option<String>

Optional language of the linked resource

§id: Option<String>

Optional unique identifier for this link item

Provides an ID that can be used to reference this link from other elements.

§mime: Option<String>

Optional MIME type of the linked resource

§properties: Option<String>

Optional properties of this link

Contains space-separated property values that describe characteristics of the link or the linked resource. For example, “onix-3.0” to indicate an ONIX 3.0 record.

§refines: Option<String>

Optional reference to another metadata item

In EPUB 3.0, links can refine other metadata items. This field contains the ID of the metadata item that this link refines, prefixed with “#”.

Trait Implementations§

Source§

impl Debug for MetadataLinkItem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.