pub struct Ranked<T>where
T: Ord,{ /* private fields */ }Expand description
Ranked item: score descending, ID ascending for ties.
Implementations§
Source§impl<T> Ranked<T>where
T: Ord,
impl<T> Ranked<T>where
T: Ord,
pub fn new(score: DeterministicScore, id: T) -> Ranked<T>
pub fn score(&self) -> DeterministicScore
pub fn id(&self) -> &T
pub fn into_id(self) -> T
pub fn into_parts(self) -> (DeterministicScore, T)
Trait Implementations§
Source§impl<T> Ord for Ranked<T>where
T: Ord,
impl<T> Ord for Ranked<T>where
T: Ord,
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
Source§impl<T> PartialOrd for Ranked<T>where
T: Ord,
impl<T> PartialOrd for Ranked<T>where
T: Ord,
impl<T> Eq for Ranked<T>
impl<T> StructuralPartialEq for Ranked<T>where
T: Ord,
Auto Trait Implementations§
impl<T> Freeze for Ranked<T>where
T: Freeze,
impl<T> RefUnwindSafe for Ranked<T>where
T: RefUnwindSafe,
impl<T> Send for Ranked<T>where
T: Send,
impl<T> Sync for Ranked<T>where
T: Sync,
impl<T> Unpin for Ranked<T>where
T: Unpin,
impl<T> UnsafeUnpin for Ranked<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Ranked<T>where
T: UnwindSafe,
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