pub struct ConstraintName(/* private fields */);Expand description
A strongly typed database identifier wrapper: ConstraintName.
Implementations§
Source§impl ConstraintName
impl ConstraintName
Sourcepub fn new(input: impl AsRef<str>) -> Result<Self, DatabaseNameError>
pub fn new(input: impl AsRef<str>) -> Result<Self, DatabaseNameError>
Creates a database identifier from non-empty text.
§Errors
Returns DatabaseNameError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the identifier and returns the owned string.
Trait Implementations§
Source§impl AsRef<str> for ConstraintName
impl AsRef<str> for ConstraintName
Source§impl Clone for ConstraintName
impl Clone for ConstraintName
Source§fn clone(&self) -> ConstraintName
fn clone(&self) -> ConstraintName
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 ConstraintName
impl Debug for ConstraintName
Source§impl Display for ConstraintName
impl Display for ConstraintName
Source§impl FromStr for ConstraintName
impl FromStr for ConstraintName
Source§impl Hash for ConstraintName
impl Hash for ConstraintName
Source§impl Ord for ConstraintName
impl Ord for ConstraintName
Source§fn cmp(&self, other: &ConstraintName) -> Ordering
fn cmp(&self, other: &ConstraintName) -> 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 ConstraintName
impl PartialEq for ConstraintName
Source§fn eq(&self, other: &ConstraintName) -> bool
fn eq(&self, other: &ConstraintName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ConstraintName
impl PartialOrd for ConstraintName
Source§impl TryFrom<&str> for ConstraintName
impl TryFrom<&str> for ConstraintName
impl Eq for ConstraintName
impl StructuralPartialEq for ConstraintName
Auto Trait Implementations§
impl Freeze for ConstraintName
impl RefUnwindSafe for ConstraintName
impl Send for ConstraintName
impl Sync for ConstraintName
impl Unpin for ConstraintName
impl UnsafeUnpin for ConstraintName
impl UnwindSafe for ConstraintName
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