pub struct Content {
pub body: Option<String>,
pub content_type: MediaTypeBuf,
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: MediaTypeBuf
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
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Content
impl<'de> Deserialize<'de> for Content
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 Eq for Content
impl StructuralPartialEq for Content
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
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