#[non_exhaustive]pub enum ChangeFreq {
Always,
Hourly,
Daily,
Weekly,
Monthly,
Yearly,
Never,
}Expand description
How often a page is expected to change, as the sitemap protocol spells it.
An enum rather than a string so "weakly" is a compile error instead of a sitemap that
search engines quietly ignore. Use str::parse when the value arrives as text.
§Examples
use molt::sitemap::ChangeFreq;
assert_eq!(ChangeFreq::Weekly.as_str(), "weekly");
assert_eq!("monthly".parse::<ChangeFreq>(), Ok(ChangeFreq::Monthly));
assert!("weakly".parse::<ChangeFreq>().is_err());Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Always
always — changes on every access.
Hourly
hourly.
Daily
daily.
Weekly
weekly.
Monthly
monthly.
Yearly
yearly.
Never
never — archived content.
Implementations§
Trait Implementations§
Source§impl Clone for ChangeFreq
impl Clone for ChangeFreq
impl Copy for ChangeFreq
Source§impl Debug for ChangeFreq
impl Debug for ChangeFreq
Source§impl Display for ChangeFreq
impl Display for ChangeFreq
impl Eq for ChangeFreq
Source§impl FromStr for ChangeFreq
impl FromStr for ChangeFreq
Source§impl Hash for ChangeFreq
impl Hash for ChangeFreq
Source§impl PartialEq for ChangeFreq
impl PartialEq for ChangeFreq
impl StructuralPartialEq for ChangeFreq
Auto Trait Implementations§
impl Freeze for ChangeFreq
impl RefUnwindSafe for ChangeFreq
impl Send for ChangeFreq
impl Sync for ChangeFreq
impl Unpin for ChangeFreq
impl UnsafeUnpin for ChangeFreq
impl UnwindSafe for ChangeFreq
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> 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 more