Struct RowKey
pub struct RowKey(/* private fields */);Expand description
The key for a row in an architecture comparison table. All encodings that have the same RowKey should be grouped into the same row.
Implementations§
§impl RowKey
impl RowKey
pub fn new_from_iter(
num_arches: usize,
exists: impl Iterator<Item = bool>,
check_equal: impl FnMut(usize, usize) -> bool,
) -> RowKey
pub fn new_from_iter( num_arches: usize, exists: impl Iterator<Item = bool>, check_equal: impl FnMut(usize, usize) -> bool, ) -> RowKey
Creates a new RowKey.
The exists iterator should yield num_arches bools that determine whether the instructions exist for that architecture.
The check_equal function should return true if the semantics for the two architectures (passed as indices) are equal.
check_equal should return false if the instructions do not exist on one of the two architectures, but true if they do not exist on both architectures.
pub fn implementation_indices(
&self,
num_arches: usize,
) -> impl Iterator<Item = Option<usize>> + '_
pub fn implementation_indices( &self, num_arches: usize, ) -> impl Iterator<Item = Option<usize>> + '_
Returns an iterator that yields the smallest architecture index that has equivalent semantics, for each architecture.
pub fn extract_sets(&self, num_arches: usize) -> (Vec<Vec<usize>>, Vec<usize>)
pub fn extract_sets(&self, num_arches: usize) -> (Vec<Vec<usize>>, Vec<usize>)
Extracts sets of equivalent semantics.
Returns (equivalent_sets, missing), where equivalent_sets is a Vec containing one or more sets of architectures with equivalent semantics, and missing is a set of architectures on which the instructions described by this RowKey do not exist.
Trait Implementations§
§impl Ord for RowKey
impl Ord for RowKey
§impl PartialOrd for RowKey
impl PartialOrd for RowKey
impl Copy for RowKey
impl Eq for RowKey
impl StructuralPartialEq for RowKey
Auto Trait Implementations§
impl Freeze for RowKey
impl RefUnwindSafe for RowKey
impl Send for RowKey
impl Sync for RowKey
impl Unpin for RowKey
impl UnwindSafe for RowKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more