pub trait Primitive:
Send
+ Serialize
+ Deserialize {
Show 19 methods
// Required methods
fn is_eq(&self, other: &dyn Primitive) -> bool;
fn is_cmp(&self, other: &dyn Primitive) -> Option<Ordering>;
fn do_add(
&self,
other: &dyn Primitive,
) -> Result<Box<dyn Primitive>, String>;
fn do_sub(
&self,
other: &dyn Primitive,
) -> Result<Box<dyn Primitive>, String>;
fn do_div(
&self,
other: &dyn Primitive,
) -> Result<Box<dyn Primitive>, String>;
fn do_mul(
&self,
other: &dyn Primitive,
) -> Result<Box<dyn Primitive>, String>;
fn do_rem(
&self,
other: &dyn Primitive,
) -> Result<Box<dyn Primitive>, String>;
fn as_debug(&self) -> &dyn Debug;
fn as_any(&self) -> &dyn Any;
fn get_type(&self) -> PrimitiveType;
fn as_box_clone(&self) -> Box<dyn Primitive>;
fn to_json(&self) -> Value;
fn format_mem(&self, content_type: &str, first: bool) -> Value;
fn to_string(&self) -> String;
fn as_bool(&self) -> bool;
fn get_value(&self) -> &dyn Any;
fn get_mut_value(&mut self) -> &mut dyn Any;
fn to_msg(&self, content_type: String) -> Message;
fn do_exec(
&mut self,
name: &str,
args: &HashMap<String, Literal>,
mem_type: &MemoryType,
additional_info: &Option<HashMap<String, Literal>>,
interval: Interval,
content_type: &ContentType,
data: &mut Data<'_>,
msg_data: &mut MessageData,
sender: &Option<Sender<MSG>>,
) -> Result<(Literal, Right), ErrorInfo>;
}Required Methods§
fn is_eq(&self, other: &dyn Primitive) -> bool
fn is_cmp(&self, other: &dyn Primitive) -> Option<Ordering>
fn do_add(&self, other: &dyn Primitive) -> Result<Box<dyn Primitive>, String>
fn do_sub(&self, other: &dyn Primitive) -> Result<Box<dyn Primitive>, String>
fn do_div(&self, other: &dyn Primitive) -> Result<Box<dyn Primitive>, String>
fn do_mul(&self, other: &dyn Primitive) -> Result<Box<dyn Primitive>, String>
fn do_rem(&self, other: &dyn Primitive) -> Result<Box<dyn Primitive>, String>
fn as_debug(&self) -> &dyn Debug
fn as_any(&self) -> &dyn Any
fn get_type(&self) -> PrimitiveType
fn as_box_clone(&self) -> Box<dyn Primitive>
fn to_json(&self) -> Value
fn format_mem(&self, content_type: &str, first: bool) -> Value
fn to_string(&self) -> String
fn as_bool(&self) -> bool
fn get_value(&self) -> &dyn Any
fn get_mut_value(&mut self) -> &mut dyn Any
fn to_msg(&self, content_type: String) -> Message
fn do_exec( &mut self, name: &str, args: &HashMap<String, Literal>, mem_type: &MemoryType, additional_info: &Option<HashMap<String, Literal>>, interval: Interval, content_type: &ContentType, data: &mut Data<'_>, msg_data: &mut MessageData, sender: &Option<Sender<MSG>>, ) -> Result<(Literal, Right), ErrorInfo>
Implementations§
Source§impl dyn Primitive
impl dyn Primitive
pub fn exec( &mut self, name: &str, args: &HashMap<String, Literal>, mem_type: &MemoryType, additional_info: &Option<HashMap<String, Literal>>, interval: Interval, content_type: &ContentType, mem_update: &mut bool, data: &mut Data<'_>, msg_data: &mut MessageData, sender: &Option<Sender<MSG>>, ) -> Result<Literal, ErrorInfo>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Box<dyn Primitive>
impl<'de> Deserialize<'de> for Box<dyn Primitive>
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
Source§impl<'de> Deserialize<'de> for Box<dyn Primitive + Send>
impl<'de> Deserialize<'de> for Box<dyn Primitive + Send>
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
Source§impl PartialOrd for dyn Primitive
impl PartialOrd for dyn Primitive
Implementors§
impl Primitive for PrimitiveArray
impl Primitive for PrimitiveBoolean
impl Primitive for PrimitiveClosure
TRAIT FUNCTIONS
impl Primitive for PrimitiveFloat
impl Primitive for PrimitiveInt
TRAIT FUNCTIONS