Enum oso::PolarValue [−][src]
pub enum PolarValue {
Integer(i64),
Float(f64),
String(String),
Boolean(bool),
Map(HashMap<String, PolarValue>),
List(Vec<PolarValue>),
Variable(String),
Instance(Instance),
}
Expand description
An enum of the possible value types that can be sent to/from Polar.
All variants except Instance
represent types that can
be used natively in Polar.
Any other types can be wrapped using PolarValue::new_from_instance
.
If the instance has a registered Class
, then this can be used
from the policy too.
Variants
Tuple Fields of Integer
0: i64
Tuple Fields of Float
0: f64
Tuple Fields of String
0: String
Tuple Fields of Boolean
0: bool
Tuple Fields of Map
0: HashMap<String, PolarValue>
Tuple Fields of List
0: Vec<PolarValue>
Tuple Fields of Variable
0: String
Implementations
Create a PolarValue::Instance
from any type.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for PolarValue
impl Send for PolarValue
impl Sync for PolarValue
impl Unpin for PolarValue
impl !UnwindSafe for PolarValue
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more