pub struct DjotExportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub page_break_before: bool,
pub background_color: bool,
pub top_margin: bool,
pub text_indent: bool,
pub semantic_role: bool,
pub omit_images: bool,
}Expand description
Selects which optional block attributes the djot exporter emits as
{key=value} block attributes. A disabled attribute is omitted from the
output even when the model carries a value for it.
Fields§
§alignment: boolEmit paragraph alignment as {alignment=…}.
line_height: boolEmit line height as {line_height=…}.
direction: boolEmit text direction as {direction=…}.
non_breakable_lines: boolEmit non-breakable lines as {non_breakable_lines=…}.
page_break_before: boolEmit “start on a new page” as {page_break_before=…}.
background_color: boolEmit block background color as {background_color=…}.
top_margin: boolEmit the block’s own space-above as {top_margin=…}.
text_indent: boolEmit the block’s own first-line indent as {text_indent=…}.
semantic_role: boolEmit the enclosing blockquote’s semantic role as {semantic_role=…} on the
quote’s first block, so the model→djot→model round trip stays a fixpoint.
omit_images: boolDrop inline images instead of emitting {width=… height=…}.
Unlike every other field here this one is not a block attribute and is
not governed by Self::all/Self::none: an image is content, not
styling, so “emit no optional attributes” must not quietly delete it.
Only a caller that has decided not to place the image files beside the
output turns it on.
Implementations§
Source§impl DjotExportOptions
impl DjotExportOptions
Sourcepub const fn all() -> DjotExportOptions
pub const fn all() -> DjotExportOptions
Every optional block attribute emitted — the lossless default.
Sourcepub const fn none() -> DjotExportOptions
pub const fn none() -> DjotExportOptions
No optional block attributes — emit only the core structural and inline feature set, dropping any block-attribute styling.
Trait Implementations§
Source§impl Clone for DjotExportOptions
impl Clone for DjotExportOptions
Source§fn clone(&self) -> DjotExportOptions
fn clone(&self) -> DjotExportOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DjotExportOptions
Source§impl Debug for DjotExportOptions
impl Debug for DjotExportOptions
Source§impl Default for DjotExportOptions
impl Default for DjotExportOptions
Source§fn default() -> DjotExportOptions
fn default() -> DjotExportOptions
Source§impl<'de> Deserialize<'de> for DjotExportOptions
impl<'de> Deserialize<'de> for DjotExportOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DjotExportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DjotExportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for DjotExportOptions
Source§impl PartialEq for DjotExportOptions
impl PartialEq for DjotExportOptions
Source§impl Serialize for DjotExportOptions
impl Serialize for DjotExportOptions
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,
impl StructuralPartialEq for DjotExportOptions
Auto Trait Implementations§
impl Freeze for DjotExportOptions
impl RefUnwindSafe for DjotExportOptions
impl Send for DjotExportOptions
impl Sync for DjotExportOptions
impl Unpin for DjotExportOptions
impl UnsafeUnpin for DjotExportOptions
impl UnwindSafe for DjotExportOptions
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,
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
key and return true if they are equal.