Skip to main content

MoveValidationError

Enum MoveValidationError 

Source
pub enum MoveValidationError {
    UnresolvableLane {
        lane: LaneAddr,
    },
    LaneGroup(LaneGroupError),
    DestinationOccupiedByStationaryAtom {
        lane: LaneAddr,
        dst: LocationAddr,
        occupant: u32,
    },
    StaleMoverSource {
        lane: LaneAddr,
        src: LocationAddr,
        expected: u32,
    },
    ContestedDestination {
        dst: LocationAddr,
        first: LaneAddr,
        second: LaneAddr,
    },
}
Expand description

A lane group that cannot execute against a given AtomStateData.

Produced by AtomStateData::validate_moves. Static lane-group failures (address validity, duplicates, consistency, membership, AOD geometry) are delegated to ArchSpec::check_lanes and wrapped in Self::LaneGroup; the occupancy rules are this module’s own.

Variants§

§

UnresolvableLane

A lane could not be resolved to (src, dst) endpoints.

Fields

§lane: LaneAddr

The unresolvable lane.

§

LaneGroup(LaneGroupError)

Static lane-group check failure from ArchSpec::check_lanes.

§

DestinationOccupiedByStationaryAtom

A lane’s destination holds an atom that does not move in this group.

The AOD trap site arrives at every lane’s destination whether or not the lane carried an atom, so this is a fault for empty-source filler lanes just as for movers. An occupied destination is legal only when its occupant sits at the source of another lane in the same group (it vacates in the same simultaneous step).

Fields

§lane: LaneAddr

The offending lane (mover or filler).

§dst: LocationAddr

The occupied destination.

§occupant: u32

The stationary qubit at the destination.

§

StaleMoverSource

A validated mover’s source no longer holds the qubit it was resolved with, i.e. the ValidatedMoves token was produced against a different state (or against this one before it moved on).

Fields

§lane: LaneAddr

The lane whose resolved source went stale.

§src: LocationAddr

The source location the token recorded.

§expected: u32

The qubit the token expected to find there.

§

ContestedDestination

Two lanes in the group share a destination.

Unreachable through a well-formed bus (destination-unique per ArchSpec::validate); kept as a defensive check for hand-built lane groups.

Fields

§dst: LocationAddr

The shared destination.

§first: LaneAddr

The lane that claimed the destination first.

§second: LaneAddr

The lane that collided with it.

Trait Implementations§

Source§

impl Clone for MoveValidationError

Source§

fn clone(&self) -> MoveValidationError

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 Debug for MoveValidationError

Source§

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

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

impl Display for MoveValidationError

Source§

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

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

impl Eq for MoveValidationError

Source§

impl Error for MoveValidationError

1.30.0 · Source§

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

Returns 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, request: &mut Request<'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 PartialEq for MoveValidationError

Source§

fn eq(&self, other: &MoveValidationError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for MoveValidationError

Auto Trait Implementations§

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
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.

§

impl<'src, T> IntoMaybe<'src, T> for T
where T: 'src,

§

type Proj<U: 'src> = U

§

fn map_maybe<R>( self, _f: impl FnOnce(&'src T) -> &'src R, g: impl FnOnce(T) -> R, ) -> <T as IntoMaybe<'src, T>>::Proj<R>
where R: 'src,

§

impl<T> OrderedSeq<'_, T> for T
where T: Clone,

§

impl<'p, T> Seq<'p, T> for T
where T: Clone,

§

type Item<'a> = &'a T where T: 'a

The item yielded by the iterator.
§

type Iter<'a> = Once<&'a T> where T: 'a

An iterator over the items within this container, by reference.
§

fn seq_iter(&self) -> <T as Seq<'p, T>>::Iter<'_>

Iterate over the elements of the container.
§

fn contains(&self, val: &T) -> bool
where T: PartialEq,

Check whether an item is contained within this sequence.
§

fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>
where 'p: 'b,

Convert an item of the sequence into a [MaybeRef].
§

impl<T> Themed for T
where T: Display,

§

fn ty(&self) -> Decorated<'_, Self>

§

fn target(&self) -> Decorated<'_, Self>

§

fn keyword(&self) -> Decorated<'_, Self>

§

fn symbol(&self) -> Decorated<'_, Self>

§

fn at_symbol(&self) -> Decorated<'_, Self>

§

fn comment(&self) -> Decorated<'_, Self>

§

fn instruction(&self) -> Decorated<'_, 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.