[−][src]Struct dark_vm::errors::error::Error
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,