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
Integer(i64)
Tuple Fields
0: i64
Float(f64)
Tuple Fields
0: f64
String(String)
Tuple Fields
0: String
Boolean(bool)
Tuple Fields
0: bool
Map(HashMap<String, PolarValue>)
Tuple Fields
0: HashMap<String, PolarValue>
List(Vec<PolarValue>)
Tuple Fields
0: Vec<PolarValue>
Variable(String)
Tuple Fields
0: String
Instance(Instance)
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
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more