pub enum PredictionScalarV1 {
Null,
Boolean {
value: bool,
},
SignedInteger {
value: i64,
},
UnsignedInteger {
value: u64,
},
FiniteNumber {
value: FinitePredictionNumberV1,
},
Token {
value: String,
},
Text {
value: String,
},
}Expand description
Closed scalar vocabulary used by prediction bases.
Variants§
Null
Explicit null value.
Boolean
Boolean value.
SignedInteger
Signed integer value.
UnsignedInteger
Unsigned integer value.
FiniteNumber
Finite binary64 value.
Fields
§
value: FinitePredictionNumberV1Exact normalized value.
Token
Stable machine token.
Text
Bounded human/source text.
Implementations§
Source§impl PredictionScalarV1
impl PredictionScalarV1
Sourcepub fn finite_number(value: f64) -> Result<Self, PredictionContractError>
pub fn finite_number(value: f64) -> Result<Self, PredictionContractError>
Construct a finite-number scalar.
Trait Implementations§
Source§impl Clone for PredictionScalarV1
impl Clone for PredictionScalarV1
Source§fn clone(&self) -> PredictionScalarV1
fn clone(&self) -> PredictionScalarV1
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PredictionScalarV1
impl Debug for PredictionScalarV1
Source§impl<'de> Deserialize<'de> for PredictionScalarV1
impl<'de> Deserialize<'de> for PredictionScalarV1
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for PredictionScalarV1
Source§impl Ord for PredictionScalarV1
impl Ord for PredictionScalarV1
Source§fn cmp(&self, other: &PredictionScalarV1) -> Ordering
fn cmp(&self, other: &PredictionScalarV1) -> Ordering
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 PartialEq for PredictionScalarV1
impl PartialEq for PredictionScalarV1
Source§impl PartialOrd for PredictionScalarV1
impl PartialOrd for PredictionScalarV1
Source§impl Serialize for PredictionScalarV1
impl Serialize for PredictionScalarV1
impl StructuralPartialEq for PredictionScalarV1
Auto Trait Implementations§
impl Freeze for PredictionScalarV1
impl RefUnwindSafe for PredictionScalarV1
impl Send for PredictionScalarV1
impl Sync for PredictionScalarV1
impl Unpin for PredictionScalarV1
impl UnsafeUnpin for PredictionScalarV1
impl UnwindSafe for PredictionScalarV1
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