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