pub struct BlockFormat {Show 20 fields
pub alignment: Option<Alignment>,
pub top_margin: Option<i32>,
pub bottom_margin: Option<i32>,
pub left_margin: Option<i32>,
pub right_margin: Option<i32>,
pub heading_level: Option<u8>,
pub indent: Option<u8>,
pub text_indent: Option<i32>,
pub marker: Option<MarkerType>,
pub tab_positions: Vec<i32>,
pub line_height: Option<f32>,
pub non_breakable_lines: Option<bool>,
pub page_break_before: Option<bool>,
pub direction: Option<TextDirection>,
pub clear_direction: bool,
pub background_color: Option<String>,
pub is_code_block: Option<bool>,
pub code_language: Option<String>,
pub hyphenate: Option<bool>,
pub language: Option<String>,
}Expand description
Block (paragraph) formatting. All fields are optional.
Fields§
§alignment: Option<Alignment>§top_margin: Option<i32>§bottom_margin: Option<i32>§left_margin: Option<i32>§right_margin: Option<i32>§heading_level: Option<u8>§indent: Option<u8>§text_indent: Option<i32>§marker: Option<MarkerType>§tab_positions: Vec<i32>§line_height: Option<f32>§non_breakable_lines: Option<bool>§page_break_before: Option<bool>Start this block on a new page, where the target format can paginate.
direction: Option<TextDirection>§clear_direction: boolUnset the block’s direction rather than setting one.
Every other field merges (None = “don’t change this”), so this
is the only way to take a paragraph back to automatic direction
detection once a direction has been stored. Wins over
direction if both are set.
background_color: Option<String>§is_code_block: Option<bool>§code_language: Option<String>§hyphenate: Option<bool>Enable automatic + soft-hyphen hyphenation for this block.
language: Option<String>Block natural language as an ISO 639-1 code (e.g. “en”, “fr”). Selects the hyphenation dictionary.
Trait Implementations§
Source§impl Clone for BlockFormat
impl Clone for BlockFormat
Source§fn clone(&self) -> BlockFormat
fn clone(&self) -> BlockFormat
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 moreSource§impl Debug for BlockFormat
impl Debug for BlockFormat
Source§impl Default for BlockFormat
impl Default for BlockFormat
Source§fn default() -> BlockFormat
fn default() -> BlockFormat
Returns the “default value” for a type. Read more
Source§impl From<&BlockDto> for BlockFormat
impl From<&BlockDto> for BlockFormat
Source§impl PartialEq for BlockFormat
impl PartialEq for BlockFormat
impl StructuralPartialEq for BlockFormat
Auto Trait Implementations§
impl Freeze for BlockFormat
impl RefUnwindSafe for BlockFormat
impl Send for BlockFormat
impl Sync for BlockFormat
impl Unpin for BlockFormat
impl UnsafeUnpin for BlockFormat
impl UnwindSafe for BlockFormat
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