pub struct Source {
pub url: String,
pub title: Option<String>,
}
Expand description
Represents the source of an RSS item.
Fields§
§url: String
The URL of the source.
title: Option<String>
The title of the source.
Implementations§
source§impl Source
impl Source
sourcepub fn url(&self) -> &str
pub fn url(&self) -> &str
Return the URL of this source.
Examples
use rss::Source;
let mut source = Source::default();
source.set_url("http://example.com");
assert_eq!(source.url(), "http://example.com");
sourcepub fn set_url<V>(&mut self, url: V)where
V: Into<String>,
pub fn set_url<V>(&mut self, url: V)where V: Into<String>,
Set the URL of this source.
Examples
use rss::Source;
let mut source = Source::default();
source.set_url("http://example.com");
Trait Implementations§
source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Source
impl PartialEq for Source
impl StructuralPartialEq for Source
Auto Trait Implementations§
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more