#[non_exhaustive]pub struct ConvertOptions {
pub revisions: RevisionView,
pub resample_pictures: bool,
pub font_dirs: Vec<PathBuf>,
pub font_cache: bool,
pub debug_wrap: bool,
}Expand description
Per-conversion settings. The defaults reproduce Word’s online export; each
option moves one behaviour towards desktop Word or adapts the conversion to
its host. Explicit options never read the environment;
ConvertOptions::from_env reads the same settings from DOCXIDE_*
variables and is what the functions without an options argument use.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.revisions: RevisionViewWhich view of the tracked changes to print. Environment:
DOCXIDE_REVISIONS=markup.
resample_pictures: boolResample pictures shown above 192 ppi down to 192 ppi, as Word’s online
export does. false keeps the source pixels, like a desktop export
with picture compression off. Environment: DOCXIDE_NO_RESAMPLE=1.
font_dirs: Vec<PathBuf>Font directories searched before the system ones; the first listed
wins. Environment: DOCXIDE_FONTS, colon-separated (; on Windows).
font_cache: boolRead and write the font index disk cache. Environment:
DOCXIDE_NO_FONT_CACHE=1 switches it off.
debug_wrap: boolDraw the float wrap zones on the page. Environment:
DOCXIDE_DEBUG_WRAP=1.
Implementations§
Source§impl ConvertOptions
impl ConvertOptions
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
The defaults overridden by whichever DOCXIDE_* variables are set. A
boolean variable is on unless its value is empty, 0 or false.
pub fn revisions(self, view: RevisionView) -> Self
pub fn resample_pictures(self, on: bool) -> Self
pub fn font_dirs( self, dirs: impl IntoIterator<Item = impl Into<PathBuf>>, ) -> Self
pub fn font_cache(self, on: bool) -> Self
pub fn debug_wrap(self, on: bool) -> Self
Trait Implementations§
Source§impl Clone for ConvertOptions
impl Clone for ConvertOptions
Source§impl Debug for ConvertOptions
impl Debug for ConvertOptions
Auto Trait Implementations§
impl Forget for ConvertOptions
impl Freeze for ConvertOptions
impl Move for ConvertOptions
impl RefUnwindSafe for ConvertOptions
impl Send for ConvertOptions
impl Sync for ConvertOptions
impl Unpin for ConvertOptions
impl UnsafeUnpin for ConvertOptions
impl UnwindSafe for ConvertOptions
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,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.