pub struct ExportImages(/* private fields */);Expand description
Image bytes for one export, keyed by the src of the inline images that
reference them.
A BTreeMap (not a HashMap) so packaged filenames come out in a stable
order: an EPUB or DOCX built twice from the same document must be
byte-comparable, which a randomised iteration order quietly prevents.
Implementations§
Source§impl ExportImages
impl ExportImages
pub fn new() -> ExportImages
Sourcepub fn insert(
&mut self,
src: impl Into<String>,
image: ExportImage,
) -> &mut ExportImages
pub fn insert( &mut self, src: impl Into<String>, image: ExportImage, ) -> &mut ExportImages
Register bytes for the image referenced by src.
pub fn get(&self, src: &str) -> Option<&ExportImage>
pub fn iter(&self) -> impl Iterator<Item = (&String, &ExportImage)>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Source§impl Clone for ExportImages
impl Clone for ExportImages
Source§fn clone(&self) -> ExportImages
fn clone(&self) -> ExportImages
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 ExportImages
impl Debug for ExportImages
Source§impl Default for ExportImages
impl Default for ExportImages
Source§fn default() -> ExportImages
fn default() -> ExportImages
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExportImages
impl<'de> Deserialize<'de> for ExportImages
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExportImages, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ExportImages, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExportImages
Source§impl<S> FromIterator<(S, ExportImage)> for ExportImages
impl<S> FromIterator<(S, ExportImage)> for ExportImages
Source§fn from_iter<I>(iter: I) -> ExportImageswhere
I: IntoIterator<Item = (S, ExportImage)>,
fn from_iter<I>(iter: I) -> ExportImageswhere
I: IntoIterator<Item = (S, ExportImage)>,
Creates a value from an iterator. Read more
Source§impl PartialEq for ExportImages
impl PartialEq for ExportImages
Source§impl Serialize for ExportImages
impl Serialize for ExportImages
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 ExportImages
Auto Trait Implementations§
impl Freeze for ExportImages
impl RefUnwindSafe for ExportImages
impl Send for ExportImages
impl Sync for ExportImages
impl Unpin for ExportImages
impl UnsafeUnpin for ExportImages
impl UnwindSafe for ExportImages
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.