Struct feed_rs::model::Content[][src]

pub struct Content {
    pub body: Option<String>,
    pub content_type: Mime,
    pub length: Option<u64>,
    pub src: Option<Link>,
}
Expand description

Content, or link to the content, for a given entry.

Fields

body: Option<String>

Atom

  • If the type attribute ends in +xml or /xml, then an xml document of this type is contained inline.
  • If the type attribute starts with text, then an escaped document of this type is contained inline.
  • Otherwise a base64 encoded document of the indicated media type is contained inline.
content_type: Mime

Type of content

  • Atom: The type attribute is either text, html, xhtml, in which case the content element is defined identically to other text constructs.
  • RSS 2: Type says what its type is, a standard MIME type
length: Option<u64>

RSS 2.0: Length of the content in bytes

src: Option<Link>

Source of the content

  • Atom: If the src attribute is present, it represents the URI of where the content can be found. The type attribute, if present, is the media type of the content.
  • RSS 2.0: where the enclosure is located

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.