pub struct MediaThumbnail {
pub url: String,
pub width: Option<u32>,
pub height: Option<u32>,
pub time: Option<String>,
}Expand description
Media RSS thumbnail element
Represents a thumbnail image for a media object.
§Security Warning
The url field comes from untrusted feed input and has NOT been validated for SSRF.
Applications MUST validate URLs before fetching to prevent SSRF attacks.
§Examples
use feedparser_rs::namespace::media_rss::MediaThumbnail;
let thumbnail = MediaThumbnail {
url: "https://example.com/thumb.jpg".to_string(),
width: Some(640),
height: Some(480),
time: None,
};
assert_eq!(thumbnail.url, "https://example.com/thumb.jpg");Fields§
§url: StringURL of the thumbnail image (url attribute)
§Security Warning
This URL comes from untrusted feed input and has NOT been validated for SSRF. Applications MUST validate URLs before fetching to prevent SSRF attacks.
width: Option<u32>Width in pixels (width attribute)
height: Option<u32>Height in pixels (height attribute)
time: Option<String>Time offset in NTP format (time attribute)
Indicates which frame of the media this thumbnail represents.
Trait Implementations§
Source§impl Clone for MediaThumbnail
impl Clone for MediaThumbnail
Source§fn clone(&self) -> MediaThumbnail
fn clone(&self) -> MediaThumbnail
Returns a duplicate 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 moreSource§impl Debug for MediaThumbnail
impl Debug for MediaThumbnail
Source§impl Default for MediaThumbnail
impl Default for MediaThumbnail
Source§fn default() -> MediaThumbnail
fn default() -> MediaThumbnail
Returns the “default value” for a type. Read more
Source§impl PartialEq for MediaThumbnail
impl PartialEq for MediaThumbnail
impl Eq for MediaThumbnail
impl StructuralPartialEq for MediaThumbnail
Auto Trait Implementations§
impl Freeze for MediaThumbnail
impl RefUnwindSafe for MediaThumbnail
impl Send for MediaThumbnail
impl Sync for MediaThumbnail
impl Unpin for MediaThumbnail
impl UnwindSafe for MediaThumbnail
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