Struct atom_syndication::Link [] [src]

pub struct Link { /* fields omitted */ }

Represents a link in an Atom feed

Methods

impl Link
[src]

[src]

Return the URI the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_href("http://example.com");
assert_eq!(link.href(), "http://example.com");

[src]

Set the URI of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_href("http://example.com");

[src]

Return the relation type of this link.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_rel("alternate");
assert_eq!(link.rel(), "alternate");

[src]

Set the relation type of this link.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_rel("alternate");

[src]

Return the language of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_hreflang("en".to_string());
assert_eq!(link.hreflang(), Some("en"));

[src]

Set the language of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_hreflang("en".to_string());

[src]

Return the MIME type of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_mime_type("text/html".to_string());
assert_eq!(link.mime_type(), Some("text/html"));

[src]

Set the MIME type of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_mime_type("text/html".to_string());

[src]

Return the title of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_title("Article Title".to_string());
assert_eq!(link.title(), Some("Article Title"));

[src]

Set the title of the referenced resource.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_title("Article Title".to_string());

[src]

Return the content length of the referenced resource in bytes.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_length("1000".to_string());
assert_eq!(link.length(), Some("1000"));

[src]

Set the content length of the referenced resource in bytes.

Examples

use atom_syndication::Link;

let mut link = Link::default();
link.set_length("1000".to_string());

Trait Implementations

impl Debug for Link
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for Link
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for Link
[src]

[src]

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

[src]

This method tests for !=.

impl Default for Link
[src]

[src]

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

Auto Trait Implementations

impl Send for Link

impl Sync for Link