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