pub struct ConnectionName(/* private fields */);Expand description
A strongly typed database identifier wrapper: ConnectionName.
Implementations§
Source§impl ConnectionName
impl ConnectionName
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 ConnectionName
impl AsRef<str> for ConnectionName
Source§impl Clone for ConnectionName
impl Clone for ConnectionName
Source§fn clone(&self) -> ConnectionName
fn clone(&self) -> ConnectionName
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 ConnectionName
impl Debug for ConnectionName
Source§impl Display for ConnectionName
impl Display for ConnectionName
Source§impl FromStr for ConnectionName
impl FromStr for ConnectionName
Source§impl Hash for ConnectionName
impl Hash for ConnectionName
Source§impl Ord for ConnectionName
impl Ord for ConnectionName
Source§fn cmp(&self, other: &ConnectionName) -> Ordering
fn cmp(&self, other: &ConnectionName) -> 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 ConnectionName
impl PartialEq for ConnectionName
Source§fn eq(&self, other: &ConnectionName) -> bool
fn eq(&self, other: &ConnectionName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ConnectionName
impl PartialOrd for ConnectionName
Source§impl TryFrom<&str> for ConnectionName
impl TryFrom<&str> for ConnectionName
impl Eq for ConnectionName
impl StructuralPartialEq for ConnectionName
Auto Trait Implementations§
impl Freeze for ConnectionName
impl RefUnwindSafe for ConnectionName
impl Send for ConnectionName
impl Sync for ConnectionName
impl Unpin for ConnectionName
impl UnsafeUnpin for ConnectionName
impl UnwindSafe for ConnectionName
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