Struct dprint_swc_ecma_ast_view::TextLines[][src]

pub struct TextLines { /* fields omitted */ }

Implementations

Creates a new TextLines with the specified text and default indent width of 4.

Creates a new TextLines with the specified text and indent width. The indent width sets the width of a tab character when getting the display column.

Gets the number of lines in the text.

Gets the text length in bytes.

Gets the line index from a byte index. Note that if you provide the middle byte index of a \r\n newline then it will return the index of the line the preceding line.

Gets the line start byte index.

Gets the line end byte index (before/at the newline character).

Gets the line range.

Gets the line and column index of the provided byte index.

Gets the line and column display based on the indentation width and the provided byte index.

Gets the line and column display based on the provided byte index and indentation width.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more