MetadataOpfV3

Struct MetadataOpfV3 

Source
pub struct MetadataOpfV3 {
    pub property: String,
    pub content: String,
    pub dir: Option<String>,
    pub id: Option<String>,
    pub refines: Option<String>,
    pub scheme: Option<String>,
    pub xml_lang: Option<String>,
}
Expand description

Represents the EPUB <meta> content inside content.opf file.

content https://www.w3.org/TR/epub-33/#sec-meta-elem

Fields§

§property: String

The property attribute takes a property data type value that defines the statement made in the expression, and the text content of the element represents the assertion. https://www.w3.org/TR/epub-33/#attrdef-meta-property

§content: String

The content of the metadata tag very much based on what you put in property

§dir: Option<String>

Specifies the base direction [bidi] of the textual content and attribute values of the carrying element and its descendants. https://www.w3.org/TR/epub-33/#attrdef-dir

§id: Option<String>

The ID xml of the element, which MUST be unique within the document scope. https://www.w3.org/TR/epub-33/#attrdef-id

§refines: Option<String>

Establishes an association between the current expression and the element or resource identified by its value. https://www.w3.org/TR/epub-33/#attrdef-refines

§scheme: Option<String>

The scheme attribute identifies the system or scheme the EPUB creator obtained the element’s value from. https://www.w3.org/TR/epub-33/#attrdef-scheme

§xml_lang: Option<String>

Specifies the language of the textual content and attribute values of the carrying element and its descendants. https://www.w3.org/TR/epub-33/#attrdef-xml-lang

Implementations§

Source§

impl MetadataOpfV3

Source

pub fn new(property: String, content: String) -> MetadataOpfV3

Create instance of MetadataOpfV3

Source

pub fn add_direction(&mut self, direction: String) -> &mut Self

Add reading direction metadata

Source

pub fn add_id(&mut self, id: String) -> &mut Self

Add id metadata

Source

pub fn add_refines(&mut self, refines: String) -> &mut Self

Add refines metadata

Source

pub fn add_scheme(&mut self, scheme: String) -> &mut Self

Add scheme metadata

Source

pub fn add_xml_lang(&mut self, xml_lang: String) -> &mut Self

Add xml_lang metadata

Trait Implementations§

Source§

impl Debug for MetadataOpfV3

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, 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.