Struct leo_errors::emitter::Handler

source ·
pub struct Handler { /* private fields */ }
Expand description

A handler deals with errors and other compiler output.

Implementations

Construct a Handler using the given emitter.

Construct a Handler that will append to buf.

Runs logic provided a handler that collects all errors into the String, or if there were none, returns some T.

Emit the error err.

Emit the error err.

Emits the error err. This will immediately abort compilation.

The number of errors thus far.

The number of warnings thus far.

Did we have any errors thus far?

Gets the last emitted error’s exit code if it exists. Then exits the program with it if it did exist.

Extend handler with error given res = Err(error).

Trait Implementations

Returns the “default value” for a type. Read more

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.