pub struct TDoc<'a> {
pub name: &'a str,
pub aliases: &'a Map<String>,
pub bag: &'a Map<Thing>,
pub local_variables: &'a mut Map<Thing>,
pub referenced_local_variables: &'a mut Map<String>,
}
Fields
name: &'a str
aliases: &'a Map<String>
bag: &'a Map<Thing>
local_variables: &'a mut Map<Thing>
referenced_local_variables: &'a mut Map<String>
string $msg: $message then msg is a referenced_variable that is won’t become new local_variable
Implementations
sourceimpl<'a> TDoc<'a>
impl<'a> TDoc<'a>
pub fn get_variable_kind(&self, section: &Section) -> Result<Kind>
pub fn from_json<T>(&self, json: &T, section: &Section) -> Result<Value> where
T: Serialize + Debug,
pub fn from_json_rows(
&self,
section: &Section,
rows: &[Vec<Value>]
) -> Result<Value>
pub fn from_json_row(&self, section: &Section, row: &[Value]) -> Result<Value>
pub fn format_name(&self, name: &str) -> String
pub fn resolve_name_without_full_path(
&self,
line_number: usize,
name: &str
) -> Result<String>
pub fn resolve_name_with_instruction(
&self,
line_number: usize,
name: &str,
instructions: &[Instruction]
) -> Result<String>
pub fn resolve_name(&self, line_number: usize, name: &str) -> Result<String>
pub fn get_record(&self, line_number: usize, name: &str) -> Result<Record>
pub fn get_or_type(&self, line_number: usize, name: &str) -> Result<OrType>
pub fn get_or_type_with_variant(
&self,
line_number: usize,
name: &str
) -> Result<OrType>
pub fn is_variable_record_type(
&self,
line_number: usize,
name: &str
) -> Result<bool>
pub fn get_value_and_conditions(
&self,
line_number: usize,
name: &str
) -> Result<(Value, Vec<(Boolean, Value)>)>
pub fn get_value(&self, line_number: usize, name: &str) -> Result<Value>
pub fn get_component(&self, line_number: usize, name: &str) -> Result<Component>
pub fn get_root(
&'a self,
name: &'a str,
line_number: usize
) -> Result<Option<&'_ str>>
pub fn get_initial_thing(
&'a self,
line_number: usize,
name: &'a str
) -> Result<(Thing, Option<String>)>
pub fn set_value(
&'a self,
line_number: usize,
name: &'a str,
value: Variable
) -> Result<Variable>
pub fn get_thing(&'a self, line_number: usize, name: &'a str) -> Result<Thing>
Trait Implementations
sourceimpl<'a> PartialEq<TDoc<'a>> for TDoc<'a>
impl<'a> PartialEq<TDoc<'a>> for TDoc<'a>
impl<'a> StructuralPartialEq for TDoc<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for TDoc<'a>
impl<'a> Send for TDoc<'a>
impl<'a> Sync for TDoc<'a>
impl<'a> Unpin for TDoc<'a>
impl<'a> !UnwindSafe for TDoc<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more