pub enum HtmlImageMode {
Reference,
DataUri,
Omit,
}Expand description
How an HTML export represents an inline image.
HTML is the one text export where the choice is genuinely open: the output
is a single string, but an <img> can either point at a file the caller
will write beside it or carry the bytes inline.
Variants§
Reference
Emit src exactly as the document stores it and embed nothing.
The default, because it is the only mode that cannot silently inflate the output: resolving the reference is then the caller’s business, which is also what makes a sidecar-assets layout possible.
DataUri
Inline the bytes as a data: URI, producing a self-contained file.
Base64 costs about a third more than the raw bytes, so a document with
large photographs produces a correspondingly large .html.
Omit
Drop images entirely, keeping their alt text as the accessible fallback.
Trait Implementations§
Source§impl Clone for HtmlImageMode
impl Clone for HtmlImageMode
Source§fn clone(&self) -> HtmlImageMode
fn clone(&self) -> HtmlImageMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for HtmlImageMode
Source§impl Debug for HtmlImageMode
impl Debug for HtmlImageMode
Source§impl Default for HtmlImageMode
impl Default for HtmlImageMode
Source§fn default() -> HtmlImageMode
fn default() -> HtmlImageMode
Source§impl<'de> Deserialize<'de> for HtmlImageMode
impl<'de> Deserialize<'de> for HtmlImageMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HtmlImageMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HtmlImageMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for HtmlImageMode
Source§impl PartialEq for HtmlImageMode
impl PartialEq for HtmlImageMode
Source§impl Serialize for HtmlImageMode
impl Serialize for HtmlImageMode
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,
impl StructuralPartialEq for HtmlImageMode
Auto Trait Implementations§
impl Freeze for HtmlImageMode
impl RefUnwindSafe for HtmlImageMode
impl Send for HtmlImageMode
impl Sync for HtmlImageMode
impl Unpin for HtmlImageMode
impl UnsafeUnpin for HtmlImageMode
impl UnwindSafe for HtmlImageMode
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
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
key and return true if they are equal.