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() -> Self
Sourcepub fn insert(
&mut self,
src: impl Into<String>,
image: ExportImage,
) -> &mut Self
pub fn insert( &mut self, src: impl Into<String>, image: ExportImage, ) -> &mut Self
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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExportImages
Source§impl<S: Into<String>> FromIterator<(S, ExportImage)> for ExportImages
impl<S: Into<String>> FromIterator<(S, ExportImage)> for ExportImages
Source§fn from_iter<I: IntoIterator<Item = (S, ExportImage)>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = (S, ExportImage)>>(iter: I) -> Self
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
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