Struct atom_syndication::Content [] [src]

pub struct Content { /* fields omitted */ }

Represents the content of an Atom entry

Methods

impl Content
[src]

[src]

Return the text value of the content.

If the content_type is neither "text", "html", or "xhtml" then the value should be a base64 encoded document of the indicated MIME type.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_value("Example content".to_string());
assert_eq!(content.value(), Some("Example content"));

[src]

Set the text value of the content.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_value("Example content".to_string());

[src]

Return the URI where the content can be found.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_src("http://example.com/content.html".to_string());
assert_eq!(content.src(), Some("http://example.com/content.html"));

[src]

Set the URI where the content can be found.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_src("http://example.com/content.html".to_string());

[src]

Return the type of the content.

The type is either "text", "html", "xhtml", or the MIME type of the content.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_content_type("image/png".to_string());
assert_eq!(content.content_type(), Some("image/png"));

[src]

Set the type of the content.

Examples

use atom_syndication::Content;

let mut content = Content::default();
content.set_content_type("image/png".to_string());
assert_eq!(content.content_type(), Some("image/png"));

Trait Implementations

impl Debug for Content
[src]

[src]

Formats the value using the given formatter.

impl Default for Content
[src]

[src]

Returns the "default value" for a type. Read more

impl Clone for Content
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Content
[src]

[src]

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

[src]

This method tests for !=.