pub struct RankKey {
pub usability: u8,
pub quality: i32,
pub n_insns: usize,
pub side_effects: usize,
pub vaddr: u64,
}Expand description
The default gadget order: ascending RankKey is best-first.
Key, in priority order: usability tier (descending), quality (descending), instruction count (ascending), side-effect count (ascending), address (ascending). The address is a deterministic final tie-break so the order is total and reproducible across runs, processes and platforms — which is what a cursor needs.
Fields§
§usability: u8The usability tier, 0-3; see usability.
quality: i32The quality score; see quality_score.
n_insns: usizeInstruction count, terminator included.
side_effects: usizeSide-effect count (TAXONOMY.md R11).
vaddr: u64The gadget’s address — the deterministic final tie-break.
Trait Implementations§
impl Copy for RankKey
impl Eq for RankKey
Source§impl Ord for RankKey
impl Ord for RankKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RankKey
impl PartialOrd for RankKey
impl StructuralPartialEq for RankKey
Auto Trait Implementations§
impl Freeze for RankKey
impl RefUnwindSafe for RankKey
impl Send for RankKey
impl Sync for RankKey
impl Unpin for RankKey
impl UnsafeUnpin for RankKey
impl UnwindSafe for RankKey
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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