pub struct IndentedBlock<'a> {
pub body: Vec<Statement<'a>>,
pub header: TrailingWhitespace<'a>,
pub indent: Option<&'a str>,
pub footer: Vec<EmptyLine<'a>>,
}
Fields§
§body: Vec<Statement<'a>>
Sequence of statements belonging to this indented block.
header: TrailingWhitespace<'a>
Any optional trailing comment and the final NEWLINE
at the end of the line.
indent: Option<&'a str>
A string represents a specific indentation. A None
value uses the modules’s
default indentation. This is included because indentation is allowed to be
inconsistent across a file, just not ambiguously.
Any trailing comments or lines after the dedent that are owned by this indented
block. Statements own preceeding and same-line trailing comments, but not
trailing lines, so it falls on :class:IndentedBlock
to own it. In the case
that a statement follows an :class:IndentedBlock
, that statement will own the
comments and lines that are at the same indent as the statement, and this
:class:IndentedBlock
will own the comments and lines that are indented
further.
Trait Implementations§
Source§impl<'a> Clone for IndentedBlock<'a>
impl<'a> Clone for IndentedBlock<'a>
Source§fn clone(&self) -> IndentedBlock<'a>
fn clone(&self) -> IndentedBlock<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more