pub struct Target { /* private fields */ }Expand description
An owned URI target with one admitted authority and origin form.
Component offsets retain the parser’s bounds and grammar proofs. Self::try_clone
copies the owned bytes; targets never share reference-counted storage.
Implementations§
Source§impl Target
impl Target
pub fn parse(value: &str) -> Result<Self, Error>
pub fn new(raw: &str, origin: Origin<'_>) -> Result<Self, Error>
pub fn from_host( host: &str, port: Option<NonZero<u16>>, origin: Origin<'_>, ) -> Result<Self, Error>
pub fn scheme_str(&self) -> Option<&str>
Sourcepub fn try_clone(&self) -> Result<Self, Exhausted>
pub fn try_clone(&self) -> Result<Self, Exhausted>
Copies the admitted bytes and offsets without parsing again.
pub fn host(&self) -> &str
pub fn path(&self) -> &str
pub fn path_query(&self) -> &str
pub fn query(&self) -> Option<&str>
pub fn retarget(self, raw: &str) -> Result<Self, Error>
pub fn with_origin(&self, origin: Origin<'_>) -> Result<Self, Error>
Trait Implementations§
impl Eq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnsafeUnpin for Target
impl UnwindSafe for Target
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