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,
    pub separator: &'a str,
}

Settings used by justify and justify_paragraph

Fields

Whether the last line should also be justified. Can result in weird output if the last line contains very few words.

Hyphenate if a word is longer than self.width

Width (in codepoints)

In a given line, the pattern spaces should be inserted at.

This feature is sometimes useful with CJK text in conjunction with hyphenate_overflow. When on, spaces are not considered when justifying text.

The string that should be used to separate lines. Perhaps useful on Windows where you might want "\r\n" instead.

The hyphen that should be used if hyphenate_overflow is true

The separator between paragraphs when justify is called

Trait Implementations

impl<'a> Default for Settings<'a>
[src]

[src]

Returns the "default value" for a type. Read more