pub enum VmStackValue {
Ref(VmStoreVarIdx),
Num(VmStackValueNum),
Bool(PQLBoolean),
Player(PQLPlayer),
Street(PQLStreet),
Card(PQLCard),
Rank(Option<Rank>),
Ranks(PQLRankSet),
FlopCategory(PQLFlopHandCategory),
HandType(PQLHandType),
Rating(PQLHiRating),
}Variants§
Ref(VmStoreVarIdx)
Num(VmStackValueNum)
Bool(PQLBoolean)
Player(PQLPlayer)
Street(PQLStreet)
Card(PQLCard)
Rank(Option<Rank>)
Ranks(PQLRankSet)
FlopCategory(PQLFlopHandCategory)
HandType(PQLHandType)
Rating(PQLHiRating)
Implementations§
Source§impl VmStackValue
impl VmStackValue
pub const DBL_ZERO: Self
pub const INT_ZERO: Self
pub const INT_ONE: Self
pub fn try_add(self, other: Self) -> Result<Self, RuntimeError>
pub fn try_sub(self, other: Self) -> Result<Self, RuntimeError>
pub fn try_mul(self, other: Self) -> Result<Self, RuntimeError>
pub fn try_div(self, other: Self) -> Result<Self, RuntimeError>
pub fn min_of(t: PQLType, g: PQLGame) -> Result<Self, RuntimeError>
pub fn max_of(t: PQLType, g: PQLGame) -> Result<Self, RuntimeError>
Trait Implementations§
Source§impl Clone for VmStackValue
impl Clone for VmStackValue
Source§fn clone(&self) -> VmStackValue
fn clone(&self) -> VmStackValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VmStackValue
impl Debug for VmStackValue
Source§impl Display for VmStackValue
impl Display for VmStackValue
Source§impl From<Card> for VmStackValue
impl From<Card> for VmStackValue
Source§impl From<PQLFlopHandCategory> for VmStackValue
impl From<PQLFlopHandCategory> for VmStackValue
Source§fn from(value: PQLFlopHandCategory) -> Self
fn from(value: PQLFlopHandCategory) -> Self
Converts to this type from the input type.
Source§impl From<PQLHandType> for VmStackValue
impl From<PQLHandType> for VmStackValue
Source§fn from(value: PQLHandType) -> Self
fn from(value: PQLHandType) -> Self
Converts to this type from the input type.
Source§impl From<PQLHiRating> for VmStackValue
impl From<PQLHiRating> for VmStackValue
Source§fn from(value: PQLHiRating) -> Self
fn from(value: PQLHiRating) -> Self
Converts to this type from the input type.
Source§impl From<PQLPlayer> for VmStackValue
impl From<PQLPlayer> for VmStackValue
Source§impl From<PQLStreet> for VmStackValue
impl From<PQLStreet> for VmStackValue
Source§impl From<Rank> for VmStackValue
impl From<Rank> for VmStackValue
Source§impl From<Rank16> for VmStackValue
impl From<Rank16> for VmStackValue
Source§fn from(value: PQLRankSet) -> Self
fn from(value: PQLRankSet) -> Self
Converts to this type from the input type.
Source§impl From<VmStackValue> for PQLType
impl From<VmStackValue> for PQLType
Source§fn from(v: VmStackValue) -> Self
fn from(v: VmStackValue) -> Self
Converts to this type from the input type.
Source§impl From<VmStackValue> for VmInstruction
impl From<VmStackValue> for VmInstruction
Source§fn from(value: VmStackValue) -> Self
fn from(value: VmStackValue) -> Self
Converts to this type from the input type.
Source§impl From<VmStackValue> for VmValue
impl From<VmStackValue> for VmValue
Source§fn from(value: VmStackValue) -> Self
fn from(value: VmStackValue) -> Self
Converts to this type from the input type.
Source§impl From<VmStackValueNum> for VmStackValue
impl From<VmStackValueNum> for VmStackValue
Source§fn from(value: VmStackValueNum) -> Self
fn from(value: VmStackValueNum) -> Self
Converts to this type from the input type.
Source§impl From<VmStoreVarIdx> for VmStackValue
impl From<VmStoreVarIdx> for VmStackValue
Source§fn from(value: VmStoreVarIdx) -> Self
fn from(value: VmStoreVarIdx) -> Self
Converts to this type from the input type.
Source§impl From<bool> for VmStackValue
impl From<bool> for VmStackValue
Source§fn from(value: PQLBoolean) -> Self
fn from(value: PQLBoolean) -> Self
Converts to this type from the input type.
Source§impl From<f64> for VmStackValue
impl From<f64> for VmStackValue
Source§impl From<i64> for VmStackValue
impl From<i64> for VmStackValue
Source§impl From<u8> for VmStackValue
impl From<u8> for VmStackValue
Source§fn from(v: PQLCardCount) -> Self
fn from(v: PQLCardCount) -> Self
Converts to this type from the input type.
Source§impl PartialEq for VmStackValue
impl PartialEq for VmStackValue
Source§impl PartialOrd for VmStackValue
impl PartialOrd for VmStackValue
Source§impl<'a> TryFrom<&'a VmValue> for &'a VmStackValue
impl<'a> TryFrom<&'a VmValue> for &'a VmStackValue
Source§impl<'a> TryFrom<&'a mut VmValue> for &'a mut VmStackValue
impl<'a> TryFrom<&'a mut VmValue> for &'a mut VmStackValue
Source§impl TryFrom<VmStackValue> for PQLCard
impl TryFrom<VmStackValue> for PQLCard
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for Option<Rank>
impl TryFrom<VmStackValue> for Option<Rank>
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLFlopHandCategory
impl TryFrom<VmStackValue> for PQLFlopHandCategory
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLHandType
impl TryFrom<VmStackValue> for PQLHandType
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLHiRating
impl TryFrom<VmStackValue> for PQLHiRating
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLPlayer
impl TryFrom<VmStackValue> for PQLPlayer
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLStreet
impl TryFrom<VmStackValue> for PQLStreet
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLRankSet
impl TryFrom<VmStackValue> for PQLRankSet
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for VmStackValueNum
impl TryFrom<VmStackValue> for VmStackValueNum
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for VmStoreVarIdx
impl TryFrom<VmStackValue> for VmStoreVarIdx
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLBoolean
impl TryFrom<VmStackValue> for PQLBoolean
Source§type Error = TryIntoError<VmStackValue>
type Error = TryIntoError<VmStackValue>
The type returned in the event of a conversion error.
Source§fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
fn try_from(value: VmStackValue) -> Result<Self, TryIntoError<VmStackValue>>
Performs the conversion.
Source§impl TryFrom<VmStackValue> for PQLDouble
impl TryFrom<VmStackValue> for PQLDouble
Source§impl TryFrom<VmStackValue> for PQLLong
impl TryFrom<VmStackValue> for PQLLong
Source§impl TryFrom<VmStackValue> for PQLCardCount
impl TryFrom<VmStackValue> for PQLCardCount
Source§impl TryFrom<VmValue> for VmStackValue
impl TryFrom<VmValue> for VmStackValue
impl Copy for VmStackValue
impl StructuralPartialEq for VmStackValue
Auto Trait Implementations§
impl Freeze for VmStackValue
impl RefUnwindSafe for VmStackValue
impl Send for VmStackValue
impl Sync for VmStackValue
impl Unpin for VmStackValue
impl UnwindSafe for VmStackValue
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