[][src]Trait csml_interpreter::data::primitive::Primitive

pub trait Primitive {
    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>,
        interval: Interval,
        content_type: &ContentType
    ) -> 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>,
    interval: Interval,
    content_type: &ContentType
) -> Result<(Literal, Right), ErrorInfo>

Loading content...

Implementations

impl dyn Primitive[src]

pub fn exec(
    &mut self,
    name: &str,
    args: &HashMap<String, Literal>,
    interval: Interval,
    content_type: &ContentType,
    mem_update: &mut bool
) -> Result<Literal, ErrorInfo>
[src]

Trait Implementations

impl Debug for dyn Primitive[src]

impl PartialEq<dyn Primitive + 'static> for dyn Primitive[src]

impl PartialOrd<dyn Primitive + 'static> for dyn Primitive[src]

Implementors

impl Primitive for PrimitiveArray[src]

impl Primitive for PrimitiveBoolean[src]

impl Primitive for PrimitiveFloat[src]

impl Primitive for PrimitiveInt[src]

TRAIT FUNCTIONS

impl Primitive for PrimitiveNull[src]

impl Primitive for PrimitiveObject[src]

impl Primitive for PrimitiveString[src]

Loading content...