Skip to main content

Crate rustpython_ruff_source_file

Crate rustpython_ruff_source_file 

Source

Structs§

Line
LineColumn
The line and column of an offset in a source file.
LineIndex
Index for fast byte offset to LineColumn conversions.
NewlineWithTrailingNewline
Like UniversalNewlineIterator, but includes a trailing newline as an empty line.
OneIndexed
Type-safe wrapper for a value whose logical range starts at 1, for instance the line or column numbers in a file
SourceCode
Gives access to the source code of a file and allows mapping between TextSize and LineColumn.
SourceFile
A source file that is identified by its name. Optionally stores the source code and LineIndex.
SourceFileBuilder
A Builder for constructing a SourceFile
SourceLocation
A position into a source file represented by the line number and the offset to that character relative to the start of that line.
UniversalNewlineIterator
Like str::lines, but accommodates LF, CRLF, and CR line endings, the latter of which are not supported by str::lines.

Enums§

LineEnding
The line ending style used in Python source code. See https://docs.python.org/3/reference/lexical_analysis.html#physical-lines
PositionEncoding
SourceRow

Traits§

LineRanges
Extension trait for str that provides methods for working with ranges of lines.
UniversalNewlines
Extension trait for str that provides a UniversalNewlineIterator.

Functions§

find_newline
Finds the next newline character. Returns its position and the LineEnding.