[][src]Struct dark_vm::errors::error::Error

pub struct Error { /* fields omitted */ }

Implementations

impl Error[src]

pub fn new(kind: ErrorKind, position: usize) -> Error[src]

Constructs a new error with the error kind and the position.

Arguments

kind - The value of the error. Maintaining the value allows for the messages to be controlled across execution. position - The position where the error occurred.

pub fn message_only(kind: ErrorKind) -> Error[src]

Constructs a new error with the error kind and no position.

Arguments

kind - The value of the error. Maintaining the value allows for the messages to be controlled across execution.

pub fn prettify(self, input: &str) -> String[src]

This function generates a pretty version of the error, with arrows pointing to the exact location of the error. This function also consumes the error, therefore, it should be the last thing called.

Arguments

input - The input for the program. This is not maintained with every error because the input might be different.

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.