pub struct Url(/* private fields */);Expand description
A URL that is relative or has an allowed scheme: http, https, mailto
or tel.
Url::parse sees the value as a browser does: tabs and newlines anywhere
are dropped, leading and trailing control characters and spaces are trimmed,
and the scheme is compared without regard to case. A value that merely looks
harmless to a naive check, such as JaVa\tScRiPt:..., is rejected.
A Url satisfies UrlValue only: it cannot be placed in script, style,
document, navigation or resource contexts, where even a valid https URL is
dangerous.
Implementations§
Trait Implementations§
impl Eq for Url
impl StructuralPartialEq for Url
impl UrlValue for Url
Auto Trait Implementations§
impl Forget for Url
impl Freeze for Url
impl Move for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnsafeUnpin 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