pub struct RelationName(/* private fields */);Expand description
A strongly typed database identifier wrapper: RelationName.
Implementations§
Source§impl RelationName
impl RelationName
Sourcepub fn new(input: impl AsRef<str>) -> Result<RelationName, DatabaseNameError>
pub fn new(input: impl AsRef<str>) -> Result<RelationName, 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 RelationName
impl AsRef<str> for RelationName
Source§impl Clone for RelationName
impl Clone for RelationName
Source§fn clone(&self) -> RelationName
fn clone(&self) -> RelationName
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 RelationName
impl Debug for RelationName
Source§impl Display for RelationName
impl Display for RelationName
Source§impl FromStr for RelationName
impl FromStr for RelationName
Source§type Err = DatabaseNameError
type Err = DatabaseNameError
The associated error which can be returned from parsing.
Source§fn from_str(input: &str) -> Result<RelationName, <RelationName as FromStr>::Err>
fn from_str(input: &str) -> Result<RelationName, <RelationName as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for RelationName
impl Hash for RelationName
Source§impl Ord for RelationName
impl Ord for RelationName
Source§fn cmp(&self, other: &RelationName) -> Ordering
fn cmp(&self, other: &RelationName) -> 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 RelationName
impl PartialEq for RelationName
Source§fn eq(&self, other: &RelationName) -> bool
fn eq(&self, other: &RelationName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for RelationName
impl PartialOrd for RelationName
Source§impl TryFrom<&str> for RelationName
impl TryFrom<&str> for RelationName
Source§type Error = DatabaseNameError
type Error = DatabaseNameError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<RelationName, <RelationName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<RelationName, <RelationName as TryFrom<&str>>::Error>
Performs the conversion.
impl Eq for RelationName
impl StructuralPartialEq for RelationName
Auto Trait Implementations§
impl Freeze for RelationName
impl RefUnwindSafe for RelationName
impl Send for RelationName
impl Sync for RelationName
impl Unpin for RelationName
impl UnsafeUnpin for RelationName
impl UnwindSafe for RelationName
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