Struct rustfmt_nightly::comment::ItemizedBlock [−][src]
Expand description
Block that is formatted as an item.
An item starts with either a star *
or a dash -
. Different level of indentation are
handled by shrinking the shape accordingly.
Fields
lines: Vec<String>
the lines that are identified as part of an itemized block
indent: usize
the number of whitespaces up to the item sigil
opener: String
the string that marks the start of an item
line_start: String
sequence of whitespaces to prefix new lines that are part of the item
Implementations
Returns true
if the line is formatted as an item
Creates a new ItemizedBlock described with the given line.
The is_itemized_line
needs to be called first.
Returns a StringFormat
used for formatting the content of an item.
Returns true
if the line is part of the current itemized block.
If it is, then it is added to the internal lines list.
Returns the block as a string, with each line trimmed at the start.
Returns the block as a string under its original form.
Auto Trait Implementations
impl RefUnwindSafe for ItemizedBlock
impl Send for ItemizedBlock
impl Sync for ItemizedBlock
impl Unpin for ItemizedBlock
impl UnwindSafe for ItemizedBlock
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes