pub struct ReferrerUrl(/* private fields */);Expand description
Referrer URL label.
Implementations§
Source§impl ReferrerUrl
impl ReferrerUrl
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ReferrerValueError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ReferrerValueError>
Creates a referrer URL label.
§Errors
Returns ReferrerValueError when the URL is empty or lacks a host.
Sourcepub fn host(&self) -> ReferrerHost
pub fn host(&self) -> ReferrerHost
Extracts the host from the URL.
Trait Implementations§
Source§impl AsRef<str> for ReferrerUrl
impl AsRef<str> for ReferrerUrl
Source§impl Clone for ReferrerUrl
impl Clone for ReferrerUrl
Source§fn clone(&self) -> ReferrerUrl
fn clone(&self) -> ReferrerUrl
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 ReferrerUrl
impl Debug for ReferrerUrl
Source§impl FromStr for ReferrerUrl
impl FromStr for ReferrerUrl
Source§impl Hash for ReferrerUrl
impl Hash for ReferrerUrl
Source§impl Ord for ReferrerUrl
impl Ord for ReferrerUrl
Source§fn cmp(&self, other: &ReferrerUrl) -> Ordering
fn cmp(&self, other: &ReferrerUrl) -> 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 ReferrerUrl
impl PartialEq for ReferrerUrl
Source§fn eq(&self, other: &ReferrerUrl) -> bool
fn eq(&self, other: &ReferrerUrl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ReferrerUrl
impl PartialOrd for ReferrerUrl
impl Eq for ReferrerUrl
impl StructuralPartialEq for ReferrerUrl
Auto Trait Implementations§
impl Freeze for ReferrerUrl
impl RefUnwindSafe for ReferrerUrl
impl Send for ReferrerUrl
impl Sync for ReferrerUrl
impl Unpin for ReferrerUrl
impl UnsafeUnpin for ReferrerUrl
impl UnwindSafe for ReferrerUrl
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