#[non_exhaustive]pub struct ReadDocxOptions {
pub generate_image_previews: bool,
}Expand description
Controls optional work performed while reading a DOCX package.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.generate_image_previews: boolGenerate PNG previews for embedded images.
Disabling this avoids decoding and re-encoding non-PNG images. The original
image bytes are still available in Docx::images, while the preview is empty.
Implementations§
Source§impl ReadDocxOptions
impl ReadDocxOptions
Sourcepub const fn with_image_previews(self, generate: bool) -> Self
pub const fn with_image_previews(self, generate: bool) -> Self
Enables or disables PNG preview generation for embedded images.
Trait Implementations§
Source§impl Clone for ReadDocxOptions
impl Clone for ReadDocxOptions
Source§fn clone(&self) -> ReadDocxOptions
fn clone(&self) -> ReadDocxOptions
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 moreimpl Copy for ReadDocxOptions
Source§impl Debug for ReadDocxOptions
impl Debug for ReadDocxOptions
Source§impl Default for ReadDocxOptions
impl Default for ReadDocxOptions
impl Eq for ReadDocxOptions
Source§impl PartialEq for ReadDocxOptions
impl PartialEq for ReadDocxOptions
impl StructuralPartialEq for ReadDocxOptions
Auto Trait Implementations§
impl Freeze for ReadDocxOptions
impl RefUnwindSafe for ReadDocxOptions
impl Send for ReadDocxOptions
impl Sync for ReadDocxOptions
impl Unpin for ReadDocxOptions
impl UnsafeUnpin for ReadDocxOptions
impl UnwindSafe for ReadDocxOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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.