pub struct DatabaseUrl(/* private fields */);Implementations§
Source§impl DatabaseUrl
impl DatabaseUrl
Sourcepub fn new(input: impl AsRef<str>) -> Result<DatabaseUrl, DatabaseUrlError>
pub fn new(input: impl AsRef<str>) -> Result<DatabaseUrl, DatabaseUrlError>
Creates a database URL text wrapper.
§Errors
Returns DatabaseUrlError when text is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the wrapper and returns the stored string.
Source§impl DatabaseUrl
impl DatabaseUrl
Sourcepub fn parse_basic(&self) -> Result<DatabaseUrlParts, DatabaseUrlError>
pub fn parse_basic(&self) -> Result<DatabaseUrlParts, DatabaseUrlError>
Parses lightweight URL parts with simple string splitting.
§Errors
Returns DatabaseUrlError when the URL has no valid scheme or contains invalid parts.
Sourcepub fn scheme(&self) -> Option<DatabaseScheme>
pub fn scheme(&self) -> Option<DatabaseScheme>
Returns the URL scheme when parsing succeeds.
Trait Implementations§
Source§impl AsRef<str> for DatabaseUrl
impl AsRef<str> for DatabaseUrl
Source§impl Clone for DatabaseUrl
impl Clone for DatabaseUrl
Source§fn clone(&self) -> DatabaseUrl
fn clone(&self) -> DatabaseUrl
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 DatabaseUrl
impl Debug for DatabaseUrl
Source§impl Display for DatabaseUrl
impl Display for DatabaseUrl
Source§impl FromStr for DatabaseUrl
impl FromStr for DatabaseUrl
Source§type Err = DatabaseUrlError
type Err = DatabaseUrlError
The associated error which can be returned from parsing.
Source§fn from_str(input: &str) -> Result<DatabaseUrl, <DatabaseUrl as FromStr>::Err>
fn from_str(input: &str) -> Result<DatabaseUrl, <DatabaseUrl as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for DatabaseUrl
impl Hash for DatabaseUrl
Source§impl Ord for DatabaseUrl
impl Ord for DatabaseUrl
Source§fn cmp(&self, other: &DatabaseUrl) -> Ordering
fn cmp(&self, other: &DatabaseUrl) -> 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 DatabaseUrl
impl PartialEq for DatabaseUrl
Source§fn eq(&self, other: &DatabaseUrl) -> bool
fn eq(&self, other: &DatabaseUrl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DatabaseUrl
impl PartialOrd for DatabaseUrl
impl Eq for DatabaseUrl
impl StructuralPartialEq for DatabaseUrl
Auto Trait Implementations§
impl Freeze for DatabaseUrl
impl RefUnwindSafe for DatabaseUrl
impl Send for DatabaseUrl
impl Sync for DatabaseUrl
impl Unpin for DatabaseUrl
impl UnsafeUnpin for DatabaseUrl
impl UnwindSafe for DatabaseUrl
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