#[non_exhaustive]pub struct Link<'a> {
pub node: NodeRef<'a>,
pub href: &'a str,
pub url: String,
pub text: String,
}Expand description
A hyperlink — an <a href> or <area href> — found by Dom::links.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.node: NodeRef<'a>The <a> or <area> element.
href: &'a strThe href attribute exactly as written.
url: Stringhref resolved against the base URL (see Dom::base_url) with
resolve_url. Without an absolute base this is href cleaned up the
same way (surrounding whitespace removed), and may be relative.
text: StringThe readable link text, on one line: the element’s visible text with
whitespace collapsed. When that is empty (an icon link), the first of
aria-label, alt (for <area>), the alt of a visible image
inside, or title; otherwise empty.
Visible means not inside a hidden element (Dom::to_text skips the
same: <script>, <template>, …), nor inside an element of the link
that is hidden by its hidden attribute or by an inline style
declaring display: none or visibility: hidden (a simple check of
the attribute: no CSS cascade). aria-hidden content is kept, since it
is still shown on screen.