link_preview/profiles/
mod.rs

1use scraper::Html;
2use url::Url;
3
4use crate::LinkPreview;
5
6pub mod youtube;
7
8pub trait ProfileExt: Send + Sync + Sized {
9    /// Checks if the profile fits the given URL.
10    fn fits(url: &Url) -> bool;
11
12    /// Creates a `LinkPreview` from the provided HTML.
13    fn extract(html: &Html) -> Option<LinkPreview>;
14}