pub struct TextFSMParser {
pub values: HashMap<String, ValueDefinition>,
pub mandatory_values: Vec<String>,
pub states: HashMap<String, StateCompiled>,
}Expand description
The compiled TextFSM parser containing value definitions and state machines.
Fields§
§values: HashMap<String, ValueDefinition>Definitions of all values declared in the template.
mandatory_values: Vec<String>List of value names that are marked as ‘Required’.
states: HashMap<String, StateCompiled>Compiled state machine states.
Implementations§
Source§impl TextFSMParser
impl TextFSMParser
pub fn parse_state_rule_transition(pair: &Pair<'_, Rule>) -> RuleTransition
pub fn parse_state_rule(pair: &Pair<'_, Rule>) -> StateRule
pub fn compile_state_rule( rule: &StateRule, values: &HashMap<String, ValueDefinition>, ) -> Result<StateRuleCompiled>
pub fn parse_and_compile_state_definition( pair: &Pair<'_, Rule>, values: &HashMap<String, ValueDefinition>, ) -> Result<StateCompiled>
pub fn parse_value_definition(pair: &Pair<'_, Rule>) -> Result<ValueDefinition>
pub fn parse_value_defs( pair: &Pair<'_, Rule>, ) -> Result<(HashMap<String, ValueDefinition>, Vec<String>)>
Sourcepub fn from_string(content: &str) -> Result<Self>
pub fn from_string(content: &str) -> Result<Self>
Parses and compiles a TextFSM template from a string.
Trait Implementations§
Source§impl Clone for TextFSMParser
impl Clone for TextFSMParser
Source§fn clone(&self) -> TextFSMParser
fn clone(&self) -> TextFSMParser
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextFSMParser
impl Debug for TextFSMParser
Source§impl Default for TextFSMParser
impl Default for TextFSMParser
Source§fn default() -> TextFSMParser
fn default() -> TextFSMParser
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TextFSMParser
impl RefUnwindSafe for TextFSMParser
impl Send for TextFSMParser
impl Sync for TextFSMParser
impl Unpin for TextFSMParser
impl UnwindSafe for TextFSMParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more