Struct rss::Image [] [src]

pub struct Image { /* fields omitted */ }

Represents an image in an RSS feed.

Methods

impl Image
[src]

[src]

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");

[src]

Set the URL of this image.

Examples

use rss::Image;

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

[src]

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");

[src]

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");

[src]

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"));

[src]

Set the width of this image.

Examples

use rss::Image;

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

[src]

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"));

[src]

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());

[src]

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"));

[src]

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

impl Debug for Image
[src]

[src]

Formats the value using the given formatter.

impl Default for Image
[src]

[src]

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

impl Clone for Image
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Image
[src]

[src]

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

[src]

This method tests for !=.