pub struct MachineError {
    pub boxed: Box<MachineErrorUnboxed>,
}
Expand description

Runtime or compiler errors that may refer to a specific position in code

Fields§

§boxed: Box<MachineErrorUnboxed>

Boxed struct containing all fields (accessible through Deref and DerefMut)

Implementations§

source§

impl MachineError

source

pub fn new() -> Self

Creates a new MachineError that may also be used as a builder

source

pub fn set_kind(self, kind: MachineErrorKind) -> Self

Builder-style method to set the MachineErrorKind

source

pub fn set_message(self, message: String) -> Self

Builder-style method to set an error message

source

pub fn set_message_str(self, message: &str) -> Self

Builder-style method to set an error message using a str slice

source

pub fn set_message_opt(self, message: Option<String>) -> Self

Builder-style method to set an error message option

source

pub fn set_machine_backtrace(self, machine_backtrace: String) -> Self

Builder-style method to set machine_backtrace

source

pub fn set_machine_backtrace_opt( self, machine_backtrace: Option<String> ) -> Self

Builder-style method to set a machine_backtrace option

source

pub fn set_message_incl_chunk_name(self) -> Self

Builder-style method to set message_incl_chunk_name to true

source

pub fn set_message_incl_chunk_name_bool( self, message_incl_chunk_name: bool ) -> Self

Builder-style method to set message_incl_chunk_name to bool

source

pub fn set_chunk_name(self, chunk_name: String) -> Self

Builder-style method to set chunk_name

source

pub fn set_chunk_name_opt(self, chunk_name: Option<String>) -> Self

Builder-style method to set chunk_name option

source

pub fn set_message_incl_pos(self) -> Self

Builder-style method to set message_incl_pos to true

source

pub fn set_message_incl_pos_bool(self, message_incl_pos: bool) -> Self

Builder-style method to set message_incl_pos to a bool

source

pub fn set_line(self, line: usize) -> Self

Builder-style method to set line

source

pub fn set_line_opt(self, line: Option<usize>) -> Self

Builder-style method to set line option

source

pub fn set_column(self, column: usize) -> Self

Builder-style method to set column

source

pub fn set_column_opt(self, column: Option<usize>) -> Self

Builder-style method to set column option

source

pub fn set_position(self, position: usize) -> Self

Builder-style method to set position

source

pub fn set_position_opt(self, position: Option<usize>) -> Self

Builder-style method to set position option

Trait Implementations§

source§

impl Clone for MachineError

source§

fn clone(&self) -> MachineError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for MachineError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for MachineError

source§

fn default() -> MachineError

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

impl Deref for MachineError

§

type Target = MachineErrorUnboxed

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for MachineError

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Display for MachineError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for MachineError

1.30.0 · source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl<D> From<DatumConversionFailure<D>> for MachineError

source§

fn from(failure: DatumConversionFailure<D>) -> Self

Converts to this type from the input type.
source§

impl From<TypeMismatch> for MachineError

source§

fn from(datum_err: TypeMismatch) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<E> Provider for Ewhere E: Error + ?Sized,

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.