Enum HtmlImageMode Copy item path Source 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.
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.
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.
Drop images entirely, keeping their alt text as the accessible fallback.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more Deserialize this value from the given Serde deserializer.
Read more Serialize this value into the given Serde serializer.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.