[][src]Trait ascesis::Content

pub trait Content: Debug {
    fn get_script(&self) -> Option<&str>;
fn get_name(&self) -> Option<&str>;
fn get_carrier_ids(&mut self) -> Vec<NodeID>;
fn get_causes_by_id(&self, id: NodeID) -> Option<&Vec<Vec<NodeID>>>;
fn get_effects_by_id(&self, id: NodeID) -> Option<&Vec<Vec<NodeID>>>; }

An abstraction over script formats: various ways c-e structures are described in text.

This trait is implemented by intermediate representation types, YamlContent and ascesis::*.

Note: types implementing Content trait shouldn't own ContextHandles, because Content trait objects are owned by CEStructure structs, along with ContextHandles themselves.

Required methods

fn get_script(&self) -> Option<&str>

Script is a content description in text, for example, YAML-formatted string or Ascesis source.

fn get_name(&self) -> Option<&str>

fn get_carrier_ids(&mut self) -> Vec<NodeID>

fn get_causes_by_id(&self, id: NodeID) -> Option<&Vec<Vec<NodeID>>>

fn get_effects_by_id(&self, id: NodeID) -> Option<&Vec<Vec<NodeID>>>

Loading content...

Implementations on Foreign Types

impl Content for String[src]

Loading content...


impl Content for CesFile[src]

impl Content for PartialContent[src]

Loading content...