Crate quoth

Source

Modules§

parsable
Contains a menagerie of useful types that implement the Parsable trait.

Structs§

Diagnostic
Represents a diagnostic message that can be displayed to the user, typically indicating a parsing error or highlighting some fact about a Span of input
Error
Represents an error that occurred during parsing.
IndexedLines
An iterator over the lines of an IndexedStr.
IndexedSlice
A &str replacement that allows for safe indexing and slicing of multi-byte characters.
IndexedString
A String replacement that allows for safe indexing and slicing of multi-byte characters.
LineCol
Represents a line and column within a Source.
ParseStream
Represents a stream of text that can be parsed.
Source
Represents source text that can be indexed into to define individual Spans.
Span
Represents a specific range of text within a Source.
SpanJoinError
Indicates that two Spans could not be joined because they do not come from the same Source.

Enums§

DiagnosticLevel
Represents the severity of a Diagnostic.

Traits§

IndexedStr
A trait that facilitates safe interaction with strings that contain multi-byte characters.
MultiSpan
A trait for types that have multiple Spans.
Parsable
Types that can be parsed using Quoth must implement this trait.
Pattern
Generic over types that can be used to create a Regex
Peekable
Indicates that a type can be used to peek at a ParseStream.
Spanned
A trait for types that have a Span.

Functions§

common_prefix
Utility function to find the common prefix between two strs.
parse
Attempts to parse the specified string into a value of type T.

Type Aliases§

Result
Represents the result of a parsing operation.

Derive Macros§

ParsableExt
Derives Display and FromStr based on the the parse() and unparse() implementations of Parsable for this type, respectively.
Spanned
Automatically derives Spanned for the annotated type. This will work as long as there is some struct field of type Span.