pub trait Content: Debug {
// Required methods
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>>>;
}Expand description
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§
Sourcefn get_script(&self) -> Option<&str>
fn get_script(&self) -> Option<&str>
Script is a content description in text, for example,
YAML-formatted string or Ascesis source.