A few more derives
This commit is contained in:
parent
541d70711c
commit
c912c65255
2 changed files with 3 additions and 2 deletions
|
@ -14,6 +14,7 @@ const MANIFEST_SELECTOR: &str = "link[rel~='manifest']";
|
||||||
/// Represents useful data scraped from HTML.
|
/// Represents useful data scraped from HTML.
|
||||||
///
|
///
|
||||||
/// To obtain, use [`HTML::scan_html`].
|
/// To obtain, use [`HTML::scan_html`].
|
||||||
|
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct HTML {
|
pub struct HTML {
|
||||||
pub icons: Vec<Icon>,
|
pub icons: Vec<Icon>,
|
||||||
pub manifest: Option<Url>,
|
pub manifest: Option<Url>,
|
||||||
|
|
|
@ -9,7 +9,7 @@ use crate::Error;
|
||||||
///
|
///
|
||||||
/// More sources may be added in the future.
|
/// More sources may be added in the future.
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
|
||||||
pub enum IconKind {
|
pub enum IconKind {
|
||||||
/// Discovered through checking a hardcoded URL path, like `/favicon.ico`
|
/// Discovered through checking a hardcoded URL path, like `/favicon.ico`
|
||||||
HardcodedURL,
|
HardcodedURL,
|
||||||
|
@ -22,7 +22,7 @@ pub enum IconKind {
|
||||||
/// A scraped icon.
|
/// A scraped icon.
|
||||||
///
|
///
|
||||||
/// To obtain, use [`crate::scrape`], [`crate::html::HTML::scan_html`], or [`crate::manifest::scan_manifest`].
|
/// To obtain, use [`crate::scrape`], [`crate::html::HTML::scan_html`], or [`crate::manifest::scan_manifest`].
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
|
||||||
pub struct Icon {
|
pub struct Icon {
|
||||||
/// Describes how the icon was discovered
|
/// Describes how the icon was discovered
|
||||||
pub kind: IconKind,
|
pub kind: IconKind,
|
||||||
|
|
Loading…
Add table
Reference in a new issue