pub struct Url { /* private fields */ }Expand description
Absolute URL with normalized string storage.
Implementations§
Source§impl Url
impl Url
pub fn parse(input: &str) -> Result<Self, ParseError>
pub fn as_str(&self) -> &str
pub fn scheme(&self) -> &str
pub fn path(&self) -> &str
pub fn query(&self) -> Option<&str>
pub fn port(&self) -> Option<u16>
pub fn port_or_known_default(&self) -> Option<u16>
pub fn host(&self) -> Option<Host>
pub fn host_str(&self) -> Option<&str>
pub fn set_scheme(&mut self, scheme: &str) -> Result<(), ParseError>
pub fn set_port(&mut self, port: Option<u16>) -> Result<(), ParseError>
pub fn set_host(&mut self, host: Option<&str>) -> Result<(), ParseError>
pub fn set_query(&mut self, query: Option<&str>) -> Result<(), ParseError>
Sourcepub fn join(&self, reference: &str) -> Result<Self, ParseError>
pub fn join(&self, reference: &str) -> Result<Self, ParseError>
RFC 3986 section 5.2 reference resolution against this base URL.
Trait Implementations§
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 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