A few more derives

This commit is contained in:
CenTdemeern1 2025-02-01 01:02:19 +01:00
parent 541d70711c
commit c912c65255
2 changed files with 3 additions and 2 deletions

View file

@ -14,6 +14,7 @@ const MANIFEST_SELECTOR: &str = "link[rel~='manifest']";
/// Represents useful data scraped from HTML.
///
/// To obtain, use [`HTML::scan_html`].
#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct HTML {
pub icons: Vec<Icon>,
pub manifest: Option<Url>,

View file

@ -9,7 +9,7 @@ use crate::Error;
///
/// More sources may be added in the future.
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
pub enum IconKind {
/// Discovered through checking a hardcoded URL path, like `/favicon.ico`
HardcodedURL,
@ -22,7 +22,7 @@ pub enum IconKind {
/// A scraped icon.
///
/// 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 {
/// Describes how the icon was discovered
pub kind: IconKind,