Struct earth::feed::Link
[−]
[src]
pub struct Link { pub uri: String, pub relation: String, pub mimetype: Option<String>, pub language: Option<String>, pub title: Option<String>, pub byte_size: Option<u64>, }
Link element defined in RFC 4287 (section 4.2.7).
Fields
uri: String
The link's required URI. It corresponds to href
attribute of
RFC 4287 (section 4.2.7.1).
relation: String
The relation type of the link. It corresponds to rel
attribute
of RFC 4287 (section 4.2.7.2).
See also
Existing rel values --- Microformats Wiki
This page contains tables of known HTML
rel
values from specifications, formats, proposals, brainstorms, and non-trivial POSH usage in the wild. In addition, dropped and rejected values are listed at the end for comprehensiveness.
mimetype: Option<String>
The optional hint for the MIME media type of the linked content.
It corresponds to type
attribute of
RFC 4287 (section 4.2.7.3).
language: Option<String>
The language of the linked content. It corresponds to hreflang
attribute of RFC 4287 (section 4.2.7.4).
title: Option<String>
The title of the linked resource. It corresponds to title
attribute of RFC 4287 (section 4.2.7.5).
byte_size: Option<u64>
The optional hint for the length of the linked content in octets.
It corresponds to length
attribute of RFC 4287 (section 4.2.7.6)
.
Methods
impl Link
[src]
fn new<T>(uri: T) -> Link where
T: Into<String>,
T: Into<String>,
fn is_html(&self) -> bool
Whether its mimetype
is HTML (or XHTML).
Trait Implementations
impl Clone for Link
[src]
fn clone(&self) -> Link
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Link
[src]
fn eq(&self, __arg_0: &Link) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Link) -> bool
This method tests for !=
.
impl Eq for Link
[src]
impl Hash for Link
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Link
[src]
impl Default for Link
[src]
impl Display for Link
[src]
impl FromSchemaReader for Link
[src]
fn read_from<B: BufRead>(&mut self, element: XmlElement<B>) -> DecodeResult<()>
fn build_from<B: BufRead>(element: XmlElement<B>) -> DecodeResult<Self>
fn match_child<B: BufRead>(
&mut self,
_name: &XmlName,
_child: XmlElement<B>
) -> DecodeResult<()>
&mut self,
_name: &XmlName,
_child: XmlElement<B>
) -> DecodeResult<()>