pub struct AstroContentCollectionName(/* private fields */);Expand description
Validated Astro content collection name metadata.
Implementations§
Source§impl AstroContentCollectionName
impl AstroContentCollectionName
Sourcepub fn new(input: &str) -> Result<AstroContentCollectionName, AstroTextError>
pub fn new(input: &str) -> Result<AstroContentCollectionName, AstroTextError>
Creates Astro content collection name metadata.
§Errors
Returns AstroTextError when input is empty, contains whitespace, or has unsupported characters.
Trait Implementations§
Source§impl Clone for AstroContentCollectionName
impl Clone for AstroContentCollectionName
Source§fn clone(&self) -> AstroContentCollectionName
fn clone(&self) -> AstroContentCollectionName
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 AstroContentCollectionName
impl Debug for AstroContentCollectionName
Source§impl Display for AstroContentCollectionName
impl Display for AstroContentCollectionName
Source§impl FromStr for AstroContentCollectionName
impl FromStr for AstroContentCollectionName
Source§type Err = AstroTextError
type Err = AstroTextError
The associated error which can be returned from parsing.
Source§fn from_str(
input: &str,
) -> Result<AstroContentCollectionName, <AstroContentCollectionName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<AstroContentCollectionName, <AstroContentCollectionName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for AstroContentCollectionName
impl Hash for AstroContentCollectionName
Source§impl Ord for AstroContentCollectionName
impl Ord for AstroContentCollectionName
Source§fn cmp(&self, other: &AstroContentCollectionName) -> Ordering
fn cmp(&self, other: &AstroContentCollectionName) -> 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 AstroContentCollectionName
impl PartialEq for AstroContentCollectionName
Source§fn eq(&self, other: &AstroContentCollectionName) -> bool
fn eq(&self, other: &AstroContentCollectionName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AstroContentCollectionName
impl PartialOrd for AstroContentCollectionName
Source§impl TryFrom<&str> for AstroContentCollectionName
impl TryFrom<&str> for AstroContentCollectionName
Source§type Error = AstroTextError
type Error = AstroTextError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<AstroContentCollectionName, <AstroContentCollectionName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<AstroContentCollectionName, <AstroContentCollectionName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for AstroContentCollectionName
impl StructuralPartialEq for AstroContentCollectionName
Auto Trait Implementations§
impl Freeze for AstroContentCollectionName
impl RefUnwindSafe for AstroContentCollectionName
impl Send for AstroContentCollectionName
impl Sync for AstroContentCollectionName
impl Unpin for AstroContentCollectionName
impl UnsafeUnpin for AstroContentCollectionName
impl UnwindSafe for AstroContentCollectionName
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