Struct ConstraintName
pub struct ConstraintName(/* private fields */);Expand description
A strongly typed database identifier wrapper: ConstraintName.
Implementations§
§impl ConstraintName
impl ConstraintName
pub fn new(input: impl AsRef<str>) -> Result<ConstraintName, DatabaseNameError>
pub fn new(input: impl AsRef<str>) -> Result<ConstraintName, 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 ConstraintName
impl AsRef<str> for ConstraintName
§impl Clone for ConstraintName
impl Clone for ConstraintName
§fn clone(&self) -> ConstraintName
fn clone(&self) -> ConstraintName
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 ConstraintName
impl Debug for ConstraintName
§impl Display for ConstraintName
impl Display for ConstraintName
§impl FromStr for ConstraintName
impl FromStr for ConstraintName
§type Err = DatabaseNameError
type Err = DatabaseNameError
The associated error which can be returned from parsing.
§fn from_str(
input: &str,
) -> Result<ConstraintName, <ConstraintName as FromStr>::Err>
fn from_str( input: &str, ) -> Result<ConstraintName, <ConstraintName as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for ConstraintName
impl Hash for ConstraintName
§impl Ord for ConstraintName
impl Ord for ConstraintName
§impl PartialEq for ConstraintName
impl PartialEq for ConstraintName
§impl PartialOrd for ConstraintName
impl PartialOrd for ConstraintName
§impl TryFrom<&str> for ConstraintName
impl TryFrom<&str> for ConstraintName
§type Error = DatabaseNameError
type Error = DatabaseNameError
The type returned in the event of a conversion error.
§fn try_from(
value: &str,
) -> Result<ConstraintName, <ConstraintName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<ConstraintName, <ConstraintName as TryFrom<&str>>::Error>
Performs the conversion.
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