[−][src]Trait gs_rs::parser::Parser
Trait to be used by all parsers with the basic file parsing and composition functionality.
Required methods
fn parse_string_to_model(s: &str) -> Result<FactorGraphModel, String>
Tries to parse a string to the factor graph model used in the context with files.
fn compose_model_to_string(model: FactorGraphModel) -> Result<String, String>
Tries to compose a string containing the factor graph model's serialization.
Provided methods
fn parse_file(file_path: &str) -> Result<FactorGraph, String>
Tries to parse a file at the given path to the internal factor graph representation.
fn parse_file_to_model(file_path: &str) -> Result<FactorGraphModel, String>
Tries to parse a file at the given path to the factor graph model used in the context with files.
fn compose_file(
factor_graph: &FactorGraph,
file_path: &str
) -> Result<(), String>
factor_graph: &FactorGraph,
file_path: &str
) -> Result<(), String>
Tries to compose a file at the given path containing the serialized factor graph.
fn compose_model_to_file(
model: FactorGraphModel,
file_path: &str
) -> Result<(), String>
model: FactorGraphModel,
file_path: &str
) -> Result<(), String>
Tries to compose a file at the given path containing the factor graph model's serialization.