Struct link_preview::preview::LinkPreview [−][src]
pub struct LinkPreview {
pub title: Option<String>,
pub description: Option<String>,
pub domain: Option<String>,
pub image_url: Option<Url>,
}Fields
title: Option<String>description: Option<String>domain: Option<String>image_url: Option<Url>Implementations
Retrieves the String representation of image_url Url instance
Attempts to find the description of the page in the following order:
- Document’s
<link rel="canonical" /> element'shref` attribute - OpenGraphTag’s image meta tag (
og:image)
Attempts to find the description of the page in the following order:
- OpenGraphTag’s image meta tag (
og:image) - Document’s
<link rel="image_url" /> element'shref` attribute - Twitter Card’s image meta tag (
twitter:image) - Schema.org image meta tag (
image)
Attempts to find the description of the page in the following order:
- OpenGraphTag’s description meta tag (
og:description) - Twitter Card’s description meta tag (
twitter:description) - Schema.org description meta tag (
description) - Description meta tag (
description) - The first
pelement from the document
Attempts to find the title of the page in the following order:
- OpenGraphTag’s title meta tag (
og:title) - Twitter Card’s title meta tag (
twitter:title) - Schema.org title meta tag (
title) - The HTML’s document title
- The first
<h1>tag in the document - The first
<h2>tag in the document
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LinkPreview
impl Send for LinkPreview
impl Sync for LinkPreview
impl Unpin for LinkPreview
impl UnwindSafe for LinkPreview
Blanket Implementations
Mutably borrows from an owned value. Read more