Struct justify::Settings
[−]
[src]
pub struct Settings<'a> { pub justify_last_line: bool, pub hyphenate_overflow: bool, pub width: usize, pub insert_at: InsertAt<'a>, pub ignore_spaces: bool, pub newline: &'a str, pub hyphen: &'a str, }
Settings used by justify
and justify_paragraph
Fields
justify_last_line: bool
Whether the last line should also be justified. Can result in weird output if the last line contains very few words.
hyphenate_overflow: bool
Hyphenate if a word is longer than self.width
width: usize
Width (in codepoints)
insert_at: InsertAt<'a>
In a given line, the pattern spaces should be inserted at.
ignore_spaces: bool
This feature is sometimes useful with CJK text in conjunction with hyphenate_overflow. When on, spaces are not considered when justifying text.
newline: &'a str
The string that should be used to separate lines. Perhaps useful on Windows where you might want "\r\n" instead.
hyphen: &'a str
The hyphen that should be used if hyphenate_overflow
is true