Struct sitemap_xml_writer::Url
source · pub struct Url<'a> { /* private fields */ }
Expand description
A builder for url
entry.
Examples
Url::loc("http://www.example.com/")?
.lastmod("2005-01-01")?
.changefreq("monthly")?
.priority("0.8")?;
ⓘ
Url::loc(::url::Url::parse("http://www.example.com/")?)?
.lastmod(::chrono::NaiveDate::parse_from_str("2005-01-01", "%Y-%m-%d")?)?
.changefreq(Changefreq::Monthly)?
.priority(0.8)?;
ⓘ
Url::loc(::url::Url::parse("http://www.example.com/")?)?
.lastmod(::time::macros::date!(2005-01-01))?
.changefreq(Changefreq::Monthly)?
.priority(0.8)?;
Implementations§
source§impl<'a> Url<'a>
impl<'a> Url<'a>
sourcepub fn changefreq<S>(self, s: S) -> Result<Self, Error>where
S: TryInto<Changefreq>,
pub fn changefreq<S>(self, s: S) -> Result<Self, Error>where S: TryInto<Changefreq>,
Changes the changefreq
child entry to the specified value.
Examples
Url::loc("http://www.example.com/")?
.changefreq("monthly")?;
Url::loc("http://www.example.com/")?
.changefreq(Changefreq::Monthly)?;