Struct web_archive::parsing::ImageResource[][src]

pub struct ImageResource {
    pub data: Bytes,
    pub mimetype: String,
}

Data type representing an image

Fields

data: Bytes

Raw image data

mimetype: String

Mime type of the image, e.g. image/png

Implementations

impl ImageResource[src]

pub fn to_data_uri(&self) -> String[src]

Encode the image data as base 64 and embed it into a data: URI, e.g. data:image/png;base64,iVBORw0....

Trait Implementations

impl Debug for ImageResource[src]

impl Eq for ImageResource[src]

impl PartialEq<ImageResource> for ImageResource[src]

impl StructuralEq for ImageResource[src]

impl StructuralPartialEq for ImageResource[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.