Struct rss::Image

source ·
pub struct Image { /* private fields */ }
Expand description

Represents an image in an RSS feed.

Implementations

Return the URL of this image.

Examples
use rss::Image;

let mut image = Image::default();
image.set_url("http://example.com/image.png");
assert_eq!(image.url(), "http://example.com/image.png");

Set the URL of this image.

Examples
use rss::Image;

let mut image = Image::default();
image.set_url("http://example.com/image.png");

Return the description of this image.

This is used in the HTML alt attribute.

Examples
use rss::Image;

let mut image = Image::default();
image.set_title("Example image");
assert_eq!(image.title(), "Example image");

Set the description of this image.

This is used in the HTML alt attribute.

Examples
use rss::Image;

let mut image = Image::default();
image.set_title("Example image");

Return the URL that this image links to.

Examples
use rss::Image;

let mut image = Image::default();
image.set_link("http://example.com");
assert_eq!(image.link(), "http://example.com");

Set the URL that this image links to.

Examples
use rss::Image;

let mut image = Image::default();
image.set_link("http://example.com");

Return the width of this image.

If the width is None the default value should be considered to be 80.

Examples
use rss::Image;

let mut image = Image::default();
image.set_width("80".to_string());
assert_eq!(image.width(), Some("80"));

Set the width of this image.

Examples
use rss::Image;

let mut image = Image::default();
image.set_width("80".to_string());

Return the height of this image.

If the height is None the default value should be considered to be 31.

Examples
use rss::Image;

let mut image = Image::default();
image.set_height("31".to_string());
assert_eq!(image.height(), Some("31"));

Set the height of this image.

If the height is None the default value should be considered to be 31.

Examples
use rss::Image;

let mut image = Image::default();
image.set_height("31".to_string());

Return the title for the link formed around this image.

Examples
use rss::Image;

let mut image = Image::default();
image.set_description("Example Title".to_string());
assert_eq!(image.description(), Some("Example Title"));

Set the title for the link formed around this image.

Examples
use rss::Image;

let mut image = Image::default();
image.set_description("Example Title".to_string());

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 !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

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

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.