Enum syntect::parsing::ParseSyntaxError[][src]

pub enum ParseSyntaxError {
    InvalidYaml(ScanError),
    EmptyFile,
    MissingMandatoryKey(&'static str),
    RegexCompileError(StringBox<dyn Error + Send + Sync + 'static>),
    InvalidScope(ParseScopeError),
    BadFileRef,
    MainMissing,
    TypeMismatch,
}

Variants

InvalidYaml(ScanError)

Tuple Fields

Invalid YAML file syntax, or at least something yaml_rust can’t handle

EmptyFile

The file must contain at least one YAML document

MissingMandatoryKey(&'static str)

Tuple Fields

0: &'static str

Some keys are required for something to be a valid .sublime-syntax

RegexCompileError(StringBox<dyn Error + Send + Sync + 'static>)

Tuple Fields

0: String
1: Box<dyn Error + Send + Sync + 'static>

Invalid regex

InvalidScope(ParseScopeError)

Tuple Fields

A scope that syntect’s scope implementation can’t handle

BadFileRef

A reference to another file that is invalid

MainMissing

Syntaxes must have a context named “main”

TypeMismatch

Some part of the YAML file is the wrong type (e.g a string but should be a list) Sorry this doesn’t give you any way to narrow down where this is. Maybe use Sublime Text to figure it out.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

Performs the conversion.

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.

Performs the conversion.

Converts the given value to a String. Read more

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.