pub struct BaseUrlContext { /* private fields */ }Expand description
Context for tracking base URLs during parsing
This struct maintains the current base URL context and provides methods for URL resolution within a parsing context.
Implementations§
Source§impl BaseUrlContext
impl BaseUrlContext
Sourcepub fn with_base(base: impl Into<String>) -> Self
pub fn with_base(base: impl Into<String>) -> Self
Creates a new context with an initial base URL
Sourcepub fn update_base(&mut self, xml_base: &str)
pub fn update_base(&mut self, xml_base: &str)
Updates the base URL with a new xml:base value
The new base is resolved against the current base if it’s relative.
Sourcepub fn child_with_base(&self, xml_base: &str) -> Self
pub fn child_with_base(&self, xml_base: &str) -> Self
Creates a child context with an additional xml:base
Trait Implementations§
Source§impl Clone for BaseUrlContext
impl Clone for BaseUrlContext
Source§fn clone(&self) -> BaseUrlContext
fn clone(&self) -> BaseUrlContext
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BaseUrlContext
impl Debug for BaseUrlContext
Source§impl Default for BaseUrlContext
impl Default for BaseUrlContext
Source§fn default() -> BaseUrlContext
fn default() -> BaseUrlContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BaseUrlContext
impl RefUnwindSafe for BaseUrlContext
impl Send for BaseUrlContext
impl Sync for BaseUrlContext
impl Unpin for BaseUrlContext
impl UnwindSafe for BaseUrlContext
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)