[−][src]Struct atom_syndication::Category
Represents a category in an Atom feed
Fields
term: String
Identifies the category.
scheme: Option<String>
Identifies the categorization scheme via a URI.
label: Option<String>
A human-readable label for display.
Implementations
impl Category
[src]
pub fn term(&self) -> &str
[src]
Return the term that identifies this category.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_term("technology"); assert_eq!(category.term(), "technology");
pub fn set_term<V>(&mut self, term: V) where
V: Into<String>,
[src]
V: Into<String>,
Set the term that identifies this category.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_term("technology");
pub fn scheme(&self) -> Option<&str>
[src]
Return the categorization scheme URI.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_scheme("http://example.com/scheme".to_string()); assert_eq!(category.scheme(), Some("http://example.com/scheme"));
pub fn set_scheme<V>(&mut self, scheme: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the categorization scheme URI.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_scheme("http://example.com/scheme".to_string());
pub fn label(&self) -> Option<&str>
[src]
Return the label for this category.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_scheme("Technology".to_string()); assert_eq!(category.scheme(), Some("Technology"));
pub fn set_label<V>(&mut self, label: V) where
V: Into<Option<String>>,
[src]
V: Into<Option<String>>,
Set the label for this category.
Examples
use atom_syndication::Category; let mut category = Category::default(); category.set_scheme("Technology".to_string());
Trait Implementations
impl Clone for Category
[src]
impl Debug for Category
[src]
impl Default for Category
[src]
impl PartialEq<Category> for Category
[src]
impl StructuralPartialEq for Category
[src]
Auto Trait Implementations
impl RefUnwindSafe for Category
impl Send for Category
impl Sync for Category
impl Unpin for Category
impl UnwindSafe for Category
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,