pub struct UrlComponents {
pub protocol_end: u32,
pub username_end: u32,
pub host_start: u32,
pub host_end: u32,
pub port: Option<u32>,
pub pathname_start: Option<u32>,
pub search_start: Option<u32>,
pub hash_start: Option<u32>,
}
Expand description
Components are a serialization-free representation of a URL.
For usages where string serialization has a high cost, you can
use url components with href
attribute.
By using 32-bit integers, we implicitly assume that the URL string cannot exceed 4 GB.
https://user:pass@example.com:1234/foo/bar?baz#quux
| | | | ^^^^| | |
| | | | | | | `----- hash_start
| | | | | | `--------- search_start
| | | | | `----------------- pathname_start
| | | | `--------------------- port
| | | `----------------------- host_end
| | `---------------------------------- host_start
| `--------------------------------------- username_end
`--------------------------------------------- protocol_end
Fields§
§protocol_end: u32
§username_end: u32
§host_start: u32
§host_end: u32
§port: Option<u32>
§pathname_start: Option<u32>
§search_start: Option<u32>
§hash_start: Option<u32>
Trait Implementations§
Source§impl Debug for UrlComponents
impl Debug for UrlComponents
Source§impl From<&ada_url_components> for UrlComponents
impl From<&ada_url_components> for UrlComponents
Source§fn from(value: &ada_url_components) -> Self
fn from(value: &ada_url_components) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for UrlComponents
impl RefUnwindSafe for UrlComponents
impl Send for UrlComponents
impl Sync for UrlComponents
impl Unpin for UrlComponents
impl UnwindSafe for UrlComponents
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