pub enum Backing<'a> {
Borrowed(&'a str),
Owned(String),
}Expand description
Storage for the WHATWG href serialization.
Borrowed is used when the trimmed input was already
canonical and required no mutations. Owned is used after
the first normalization (lowercasing, path shorten, percent-encoding, IDNA, …).
§Advanced mutation
ensure_owned / as_mut_string
are crate-internal helpers. Mutating the buffer without updating Url
component offsets will corrupt the record — use public setters instead.
Variants§
Implementations§
Trait Implementations§
impl<'a> Eq for Backing<'a>
Auto Trait Implementations§
impl<'a> Freeze for Backing<'a>
impl<'a> RefUnwindSafe for Backing<'a>
impl<'a> Send for Backing<'a>
impl<'a> Sync for Backing<'a>
impl<'a> Unpin for Backing<'a>
impl<'a> UnsafeUnpin for Backing<'a>
impl<'a> UnwindSafe for Backing<'a>
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