Struct cranelift_codegen::verifier::VerifierError [−][src]
pub struct VerifierError {
pub location: AnyEntity,
pub context: Option<String>,
pub message: String,
}Expand description
A verifier error.
Fields
location: AnyEntityThe entity causing the verifier error.
context: Option<String>Optionally provide some context for the given location; e.g., for inst42 provide
Some("v3 = iconst.i32 0") for more comprehensible errors.
message: StringThe error message.
Trait Implementations
impl Clone for VerifierError[src]
impl Clone for VerifierError[src]fn clone(&self) -> VerifierError[src]
fn clone(&self) -> VerifierError[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
impl Debug for VerifierError[src]
impl Debug for VerifierError[src]impl Display for VerifierError[src]
impl Display for VerifierError[src]impl Error for VerifierError[src]
impl Error for VerifierError[src]fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>[src]
fn backtrace(&self) -> Option<&Backtrace>[src]backtrace)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str1.0.0[src]
fn description(&self) -> &str1.0.0[src]use the Display impl or to_string()
impl<L, C, M> From<(L, C, M)> for VerifierError where
L: Into<AnyEntity>,
C: Into<String>,
M: Into<String>, [src]
impl<L, C, M> From<(L, C, M)> for VerifierError where
L: Into<AnyEntity>,
C: Into<String>,
M: Into<String>, [src]Convenience converter for making error-reporting less verbose.
Converts a tuple of (location, context, message) to a VerifierError.
use cranelift_codegen::verifier::VerifierErrors; use cranelift_codegen::ir::Inst; let mut errors = VerifierErrors::new(); errors.report((Inst::from_u32(42), "v3 = iadd v1, v2", "iadd cannot be used with values of this type")); // note the double parenthenses to use this syntax
impl<L, M> From<(L, M)> for VerifierError where
L: Into<AnyEntity>,
M: Into<String>, [src]
impl<L, M> From<(L, M)> for VerifierError where
L: Into<AnyEntity>,
M: Into<String>, [src]Convenience converter for making error-reporting less verbose.
Same as above but without context.
impl PartialEq<VerifierError> for VerifierError[src]
impl PartialEq<VerifierError> for VerifierError[src]fn eq(&self, other: &VerifierError) -> bool[src]
fn eq(&self, other: &VerifierError) -> bool[src]This method tests for self and other values to be equal, and is used
by ==. Read more
fn ne(&self, other: &VerifierError) -> bool[src]
fn ne(&self, other: &VerifierError) -> bool[src]This method tests for !=.
impl Eq for VerifierError[src]
impl StructuralEq for VerifierError[src]
impl StructuralPartialEq for VerifierError[src]
Auto Trait Implementations
impl RefUnwindSafe for VerifierError
impl Send for VerifierError
impl Sync for VerifierError
impl Unpin for VerifierError
impl UnwindSafe for VerifierError
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]pub fn equivalent(&self, key: &K) -> bool[src]
pub fn equivalent(&self, key: &K) -> bool[src]Compare self to key and return true if they are equal.
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more