pub struct Url(Url);
Expand description
Represents a URL.
It is used to represent the upstream URL of a package. This type does not yet enforce a secure connection (e.g. HTTPS).
The Url
type wraps the url::Url
type.
§Examples
use std::str::FromStr;
use alpm_types::Url;
// Create Url from &str
let url = Url::from_str("https://example.com/download")?;
assert_eq!(url.as_str(), "https://example.com/download");
// Format as String
assert_eq!(format!("{url}"), "https://example.com/download");
Tuple Fields§
§0: Url
Implementations§
Trait Implementations§
source§impl FromStr for Url
impl FromStr for Url
impl Eq for Url
impl StructuralPartialEq for Url
Auto Trait Implementations§
impl Freeze for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnwindSafe for Url
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)