Skip to main content

CodeError

Enum CodeError 

Source
pub enum CodeError<Id> {
    Empty,
    MalformedLocation {
        instruction: Id,
        start: usize,
        end: usize,
    },
    OverlappingLocations {
        first: Id,
        second: Id,
    },
    IdentityMismatch {
        supplied: Id,
        derived: Id,
    },
    DuplicateIdentity {
        instruction: Id,
    },
    UnknownInstruction {
        instruction: Id,
    },
    InteriorTarget {
        from: Id,
        target: usize,
        containing: Id,
    },
    OutOfRangeTarget {
        from: Id,
        target: usize,
    },
    MalformedRegion {
        start: Id,
        end_index: usize,
    },
    OverlappingRegions {
        first_start: Id,
        second_start: Id,
    },
}
Expand description

Exact refusal evidence produced while freezing located code.

Variants§

§

Empty

No instructions were supplied.

§

MalformedLocation

An instruction’s location is empty or reversed.

Fields

§instruction: Id

Instruction carrying the malformed location.

§start: usize

Supplied inclusive start.

§end: usize

Supplied exclusive end.

§

OverlappingLocations

Two instruction source ranges overlap.

Fields

§first: Id

Earlier instruction in preparation order.

§second: Id

Conflicting instruction.

§

IdentityMismatch

The supplied stable identity does not match the instruction policy.

Fields

§supplied: Id

Identity supplied with the location.

§derived: Id

Identity derived by the instruction policy.

§

DuplicateIdentity

A stable instruction identity occurs more than once.

Fields

§instruction: Id

Repeated identity.

§

UnknownInstruction

A branch source, region boundary, or identity target is unknown.

Fields

§instruction: Id

Identity that is absent from the code.

§

InteriorTarget

A raw target lies strictly inside an instruction rather than on its boundary.

Fields

§from: Id

Instruction containing the branch or region declaration.

§target: usize

Rejected raw source position.

§containing: Id

Instruction whose interior contains the position.

§

OutOfRangeTarget

A raw target is outside every instruction boundary.

Fields

§from: Id

Instruction containing the branch or region declaration.

§target: usize

Rejected raw source position.

§

MalformedRegion

A protected region is empty or reversed.

Fields

§start: Id

Declared first instruction.

§end_index: usize

Resolved exclusive end index.

§

OverlappingRegions

Protected regions overlap.

Fields

§first_start: Id

Start identity of the first region.

§second_start: Id

Start identity of the conflicting region.

Trait Implementations§

Source§

impl<Id: Clone> Clone for CodeError<Id>

Source§

fn clone(&self) -> CodeError<Id>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Id: Debug> Debug for CodeError<Id>

Source§

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

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

impl<Id: Eq> Eq for CodeError<Id>

Source§

impl<Id: PartialEq> PartialEq for CodeError<Id>

Source§

fn eq(&self, other: &CodeError<Id>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<Id: PartialEq> StructuralPartialEq for CodeError<Id>

Auto Trait Implementations§

§

impl<Id> Freeze for CodeError<Id>
where Id: Freeze,

§

impl<Id> RefUnwindSafe for CodeError<Id>
where Id: RefUnwindSafe,

§

impl<Id> Send for CodeError<Id>
where Id: Send,

§

impl<Id> Sync for CodeError<Id>
where Id: Sync,

§

impl<Id> Unpin for CodeError<Id>
where Id: Unpin,

§

impl<Id> UnsafeUnpin for CodeError<Id>
where Id: UnsafeUnpin,

§

impl<Id> UnwindSafe for CodeError<Id>
where Id: UnwindSafe,

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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 T
where 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<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.