Struct DatabaseUrl
pub struct DatabaseUrl(/* private fields */);Implementations§
§impl DatabaseUrl
impl DatabaseUrl
pub 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.
pub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the wrapper and returns the stored string.
§impl DatabaseUrl
impl DatabaseUrl
pub 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.
pub fn scheme(&self) -> Option<DatabaseScheme>
pub fn scheme(&self) -> Option<DatabaseScheme>
Returns the URL scheme when parsing succeeds.
Trait Implementations§
§impl AsRef<str> for DatabaseUrl
impl AsRef<str> for DatabaseUrl
§impl Clone for DatabaseUrl
impl Clone for DatabaseUrl
§fn clone(&self) -> DatabaseUrl
fn clone(&self) -> DatabaseUrl
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 DatabaseUrl
impl Debug for DatabaseUrl
§impl Display for DatabaseUrl
impl Display for DatabaseUrl
§impl FromStr for DatabaseUrl
impl FromStr for DatabaseUrl
§impl Hash for DatabaseUrl
impl Hash for DatabaseUrl
§impl Ord for DatabaseUrl
impl Ord for DatabaseUrl
§impl PartialEq for DatabaseUrl
impl PartialEq for DatabaseUrl
§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