#[non_exhaustive]pub struct Resource<'a> {
pub node: NodeRef<'a>,
pub attr: &'static str,
pub value: &'a str,
pub url: String,
}Expand description
A URL-valued attribute that loads something into the page — an image,
script, stylesheet, media file or frame — found by Dom::resources.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.node: NodeRef<'a>The element carrying the URL.
attr: &'static strThe attribute it came from: "href" (on <link>), "src",
"srcset", "poster" or "data" (on <object>).
value: &'a strThe URL as written. For srcset, one candidate’s URL (without its
descriptor); a srcset yields one Resource per candidate.
url: Stringvalue resolved against the base URL, as for Link::url.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Resource<'a>
impl<'a> RefUnwindSafe for Resource<'a>
impl<'a> Send for Resource<'a>
impl<'a> Sync for Resource<'a>
impl<'a> Unpin for Resource<'a>
impl<'a> UnsafeUnpin for Resource<'a>
impl<'a> UnwindSafe for Resource<'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