Struct snoot::diagnostic::DiagnosticBag [] [src]

pub struct DiagnosticBag { /* fields omitted */ }

A structure that contains Snoot errors for easy sorting and printing

Methods

impl DiagnosticBag
[src]

Constructs a DiagnosticBag with a single diagnostic

Constructs an empty DiagnosticBag

Costructs a diagnostic bag from a Vec

Sorts the errors contained in the bag for better printing.

The sort order is by filename (primary) and by file location (secondary)

Appends another ErrorBag onto this one.

Adds a new error to the bag.

Returns true if the bag contains any error with error level "Error"

Returns true if the bag contains any error with error level "Warn"

Returns true if the bag contains any error with error level "Info"

Returns true if the bag contains any error with a custom error level

Returns true if the bag contains any error with the specified custom error level.

Returns true if there are no diagnostics

If the bag isn't empty, this will panic with the diagnostic messages as the panic string.

If the bag contains any errors, this will panic with the diagnostic messages as the panic string.

If the bag contains any warnings, this will panic with the diagnostic messages as the panic string.

Trait Implementations

impl Eq for DiagnosticBag
[src]

impl PartialEq for DiagnosticBag
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl FromIterator<Diagnostic> for DiagnosticBag
[src]

Creates a value from an iterator. Read more

impl Display for DiagnosticBag
[src]

Formats the value using the given formatter. Read more

impl Debug for DiagnosticBag
[src]

Formats the value using the given formatter.