pub struct Link {
pub url: Url,
pub link_type: LinkType,
}Expand description
Represents a link discovered on a web page.
Link encapsulates both the URL and the type of a discovered link,
enabling type-aware link processing during crawling.
§Example
use spider_util::response::{Link, LinkType};
use url::Url;
let link = Link {
url: Url::parse("https://example.com/page").unwrap(),
link_type: LinkType::Page,
};Fields§
§url: UrlThe URL of the discovered link.
link_type: LinkTypeThe type of the discovered link.
Trait Implementations§
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin for Link
impl UnwindSafe for Link
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