pub struct MetadataExtractor;
Expand description
Metadata extractor, responsible for extracting preview information from webpage content
Implementations§
Source§impl MetadataExtractor
impl MetadataExtractor
pub fn new() -> Self
pub fn extract(&self, html: &str, url: &str) -> Result<Preview, PreviewError>
Sourcepub fn extract_from_oembed(&self, oembed: &str) -> Option<Preview>
pub fn extract_from_oembed(&self, oembed: &str) -> Option<Preview>
Create a preview from oEmbed data.
Takes oEmbed HTML content as a string and extracts relevant metadata to create a preview.
Trait Implementations§
Source§impl Clone for MetadataExtractor
impl Clone for MetadataExtractor
Source§fn clone(&self) -> MetadataExtractor
fn clone(&self) -> MetadataExtractor
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for MetadataExtractor
impl RefUnwindSafe for MetadataExtractor
impl Send for MetadataExtractor
impl Sync for MetadataExtractor
impl Unpin for MetadataExtractor
impl UnwindSafe for MetadataExtractor
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