Struct CollectionName
pub struct CollectionName(/* private fields */);Expand description
A strongly typed database identifier wrapper: CollectionName.
Implementations§
§impl CollectionName
impl CollectionName
pub fn new(input: impl AsRef<str>) -> Result<CollectionName, DatabaseNameError>
pub fn new(input: impl AsRef<str>) -> Result<CollectionName, DatabaseNameError>
Creates a database identifier from non-empty text.
§Errors
Returns DatabaseNameError when the value is empty or contains control characters.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns the owned string.
Trait Implementations§
§impl AsRef<str> for CollectionName
impl AsRef<str> for CollectionName
§impl Clone for CollectionName
impl Clone for CollectionName
§fn clone(&self) -> CollectionName
fn clone(&self) -> CollectionName
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for CollectionName
impl Debug for CollectionName
§impl Display for CollectionName
impl Display for CollectionName
§impl FromStr for CollectionName
impl FromStr for CollectionName
§type Err = DatabaseNameError
type Err = DatabaseNameError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<CollectionName, <CollectionName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<CollectionName, <CollectionName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for CollectionName
impl Hash for CollectionName
§impl Ord for CollectionName
impl Ord for CollectionName
§impl PartialEq for CollectionName
impl PartialEq for CollectionName
§impl PartialOrd for CollectionName
impl PartialOrd for CollectionName
§impl TryFrom<&str> for CollectionName
impl TryFrom<&str> for CollectionName
§type Error = DatabaseNameError
type Error = DatabaseNameError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<CollectionName, <CollectionName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<CollectionName, <CollectionName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for CollectionName
impl StructuralPartialEq for CollectionName
Auto Trait Implementations§
impl Freeze for CollectionName
impl RefUnwindSafe for CollectionName
impl Send for CollectionName
impl Sync for CollectionName
impl Unpin for CollectionName
impl UnsafeUnpin for CollectionName
impl UnwindSafe for CollectionName
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