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

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

Variants

InvalidYaml

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

Tuple Fields of InvalidYaml

0: ScanError
EmptyFile

The file must contain at least one YAML document

MissingMandatoryKey

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

Tuple Fields of MissingMandatoryKey

0: &'static str
RegexCompileError

Invalid regex

Tuple Fields of RegexCompileError

0: String1: Box<dyn Error + Send + Sync + 'static>
InvalidScope

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

Tuple Fields of InvalidScope

0: ParseScopeError
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.