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