pub struct DjotImportOptions {
pub alignment: bool,
pub line_height: bool,
pub direction: bool,
pub non_breakable_lines: bool,
pub background_color: 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}.
background_color: boolApply block background color from {background_color="<value>"}.
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
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 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
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for DjotImportOptions
Source§impl PartialEq for DjotImportOptions
impl PartialEq for DjotImportOptions
Source§fn eq(&self, other: &DjotImportOptions) -> bool
fn eq(&self, other: &DjotImportOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.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,
Serialize this value into the given Serde serializer. Read more
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
Mutably borrows from an owned value. Read more