Trait onejoker::poker::hand_value::HandValueTrait

source ·
pub trait HandValueTrait {
    // Required methods
    fn value(&self) -> u64;
    fn best() -> Self;
    fn worst() -> Self;
    fn full_name(&self) -> String;
    fn ordered_for_display(&self, h: &Hand) -> aResult<Hand>;
}
Expand description

wiki | Hand value common code Common interface to hand value objects.

Required Methods§

source

fn value(&self) -> u64

Return the comparator value of this hand

source

fn best() -> Self

Best hand of this game: not necessarily a valid hand

source

fn worst() -> Self

Worst hand of this game: not necessarily a valid hand

source

fn full_name(&self) -> String

Full English name of hand, e.g. “aces and fours with a nine”

source

fn ordered_for_display(&self, h: &Hand) -> aResult<Hand>

Return a new hand re-ordered for more meaningful display.

Object Safety§

This trait is not object safe.

Implementors§