pub struct DjotImportOptions {
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,
}Expand description
Selects which optional block attributes the djot importer applies to the document model. An attribute present in the source but disabled here is parsed and discarded, exactly like an unrepresentable construct.
Fields§
§alignment: boolApply paragraph alignment from {alignment=left|right|center|justify}.
line_height: boolApply line height from {line_height=<int>}.
direction: boolApply text direction from {direction=ltr|rtl}.
non_breakable_lines: boolApply non-breakable lines from {non_breakable_lines=true|false}.
page_break_before: boolApply “start on a new page” from {page_break_before=true|false}.
background_color: boolApply block background color from {background_color="<value>"}.
top_margin: boolApply the block’s own space-above from {top_margin=<int>}, overriding
the document-wide paragraph spacing for that one block.
text_indent: boolApply the block’s own first-line indent from {text_indent=<int>},
overriding the document-wide first-line indent for that one block.
semantic_role: boolCarry the frame’s semantic role from {semantic_role=epigraph}. Unlike its
neighbours this one describes the enclosing blockquote, not the paragraph it
is written on: it rides the quote’s first block because that is the only channel
djot block attributes have, and the importer moves it onto the frame.
Implementations§
Source§impl DjotImportOptions
impl DjotImportOptions
Sourcepub const fn all() -> DjotImportOptions
pub const fn all() -> DjotImportOptions
Every optional block attribute enabled — the lossless default.
Sourcepub const fn none() -> DjotImportOptions
pub const fn none() -> DjotImportOptions
No optional block attributes — import only the core structural and inline feature set, discarding any block-attribute styling.
Trait Implementations§
Source§impl Clone for DjotImportOptions
impl Clone for DjotImportOptions
Source§fn clone(&self) -> DjotImportOptions
fn clone(&self) -> DjotImportOptions
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 DjotImportOptions
Source§impl Debug for DjotImportOptions
impl Debug for DjotImportOptions
Source§impl Default for DjotImportOptions
impl Default for DjotImportOptions
Source§fn default() -> DjotImportOptions
fn default() -> DjotImportOptions
Source§impl<'de> Deserialize<'de> for DjotImportOptions
impl<'de> Deserialize<'de> for DjotImportOptions
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DjotImportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DjotImportOptions, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for DjotImportOptions
Source§impl PartialEq for DjotImportOptions
impl PartialEq for DjotImportOptions
Source§impl Serialize for DjotImportOptions
impl Serialize for DjotImportOptions
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 DjotImportOptions
Auto Trait Implementations§
impl Freeze for DjotImportOptions
impl RefUnwindSafe for DjotImportOptions
impl Send for DjotImportOptions
impl Sync for DjotImportOptions
impl Unpin for DjotImportOptions
impl UnsafeUnpin for DjotImportOptions
impl UnwindSafe for DjotImportOptions
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.