pub struct ExportImage {
pub bytes: Vec<u8>,
pub mime_type: String,
}Expand description
One image’s bytes, together with what they are.
mime_type is carried rather than sniffed because the caller already knows
it (it stored the image) and because container formats need it verbatim:
EPUB writes it into the OPF manifest, and getting it wrong produces a book
that validates but will not render.
Fields§
§bytes: Vec<u8>§mime_type: StringImplementations§
Trait Implementations§
Source§impl Clone for ExportImage
impl Clone for ExportImage
Source§fn clone(&self) -> ExportImage
fn clone(&self) -> ExportImage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ExportImage
impl Debug for ExportImage
Source§impl Default for ExportImage
impl Default for ExportImage
Source§fn default() -> ExportImage
fn default() -> ExportImage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExportImage
impl<'de> Deserialize<'de> for ExportImage
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExportImage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExportImage, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExportImage
Source§impl PartialEq for ExportImage
impl PartialEq for ExportImage
Source§impl Serialize for ExportImage
impl Serialize for ExportImage
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ExportImage
Auto Trait Implementations§
impl Freeze for ExportImage
impl RefUnwindSafe for ExportImage
impl Send for ExportImage
impl Sync for ExportImage
impl Unpin for ExportImage
impl UnsafeUnpin for ExportImage
impl UnwindSafe for ExportImage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.