pub struct SitemapEntry {
pub loc: String,
pub lastmod: Option<DateTime<Utc>>,
pub changefreq: Option<String>,
pub priority: Option<f32>,
}Expand description
One non-page URL contributed to the sitemap by a registered
SitemapSource — e.g. a document, a routable sub-URL, or a
host-specific landing page. Appended after the page URLs in the
same sharded / indexed /sitemap.xml.
Fields§
§loc: StringAbsolute URL (https://host/path). Sources build it from the
base they’re handed so scheme/host stay consistent with the
page locs.
lastmod: Option<DateTime<Utc>>§changefreq: Option<String><changefreq> hint (daily, weekly, …); emitted verbatim.
priority: Option<f32><priority> 0.0–1.0 (clamped on render).
Implementations§
Source§impl SitemapEntry
impl SitemapEntry
pub fn new(loc: impl Into<String>) -> Self
pub fn with_lastmod(self, ts: DateTime<Utc>) -> Self
pub fn with_changefreq(self, cf: impl Into<String>) -> Self
pub fn with_priority(self, p: f32) -> Self
Trait Implementations§
Source§impl Clone for SitemapEntry
impl Clone for SitemapEntry
Auto Trait Implementations§
impl Forget for SitemapEntry
impl Freeze for SitemapEntry
impl RefUnwindSafe for SitemapEntry
impl Send for SitemapEntry
impl Sync for SitemapEntry
impl Unpin for SitemapEntry
impl UnsafeUnpin for SitemapEntry
impl UnwindSafe for SitemapEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.