pub struct MetaDescription(/* private fields */);Expand description
A validated meta description label.
Implementations§
Source§impl MetaDescription
impl MetaDescription
Sourcepub const MAX_LENGTH: usize = 180
pub const MAX_LENGTH: usize = 180
Conservative description length hint.
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, SeoValueError>
pub fn new(value: impl AsRef<str>) -> Result<Self, SeoValueError>
Creates a meta description from non-empty text.
§Errors
Returns SeoValueError when the description is empty or longer than Self::MAX_LENGTH.
Trait Implementations§
Source§impl AsRef<str> for MetaDescription
impl AsRef<str> for MetaDescription
Source§impl Clone for MetaDescription
impl Clone for MetaDescription
Source§fn clone(&self) -> MetaDescription
fn clone(&self) -> MetaDescription
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetaDescription
impl Debug for MetaDescription
Source§impl Display for MetaDescription
impl Display for MetaDescription
Source§impl FromStr for MetaDescription
impl FromStr for MetaDescription
Source§impl Hash for MetaDescription
impl Hash for MetaDescription
Source§impl Ord for MetaDescription
impl Ord for MetaDescription
Source§fn cmp(&self, other: &MetaDescription) -> Ordering
fn cmp(&self, other: &MetaDescription) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MetaDescription
impl PartialEq for MetaDescription
Source§fn eq(&self, other: &MetaDescription) -> bool
fn eq(&self, other: &MetaDescription) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MetaDescription
impl PartialOrd for MetaDescription
impl Eq for MetaDescription
impl StructuralPartialEq for MetaDescription
Auto Trait Implementations§
impl Freeze for MetaDescription
impl RefUnwindSafe for MetaDescription
impl Send for MetaDescription
impl Sync for MetaDescription
impl Unpin for MetaDescription
impl UnsafeUnpin for MetaDescription
impl UnwindSafe for MetaDescription
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