pub struct ExtractedLink {
pub url: String,
pub base: Option<Url>,
}Expand description
A raw extracted link and the optional document base used to resolve it.
Resolution is intentionally deferred until enqueue time, preserving invalid raw values for skip reporting.
§Examples
use millipede_core::link_extraction::ExtractedLink;
use url::Url;
let link = ExtractedLink {
url: "../about".to_owned(),
base: Some(Url::parse("https://example.com/docs/").unwrap()),
};
assert_eq!(link.url, "../about");Fields§
§url: StringThe unmodified link text, such as an element’s href value.
base: Option<Url>A per-document base URL, typically sourced from <base href>.
Trait Implementations§
Source§impl Clone for ExtractedLink
impl Clone for ExtractedLink
Source§fn clone(&self) -> ExtractedLink
fn clone(&self) -> ExtractedLink
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ExtractedLink
impl RefUnwindSafe for ExtractedLink
impl Send for ExtractedLink
impl Sync for ExtractedLink
impl Unpin for ExtractedLink
impl UnsafeUnpin for ExtractedLink
impl UnwindSafe for ExtractedLink
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