Struct rtlola_parser::ParserConfig
source · pub struct ParserConfig { /* private fields */ }
Expand description
The configuration of the parser.
Implementations§
source§impl ParserConfig
impl ParserConfig
sourcepub fn from_path(path_to_spec: PathBuf) -> Result<Self>
pub fn from_path(path_to_spec: PathBuf) -> Result<Self>
Reads the specification from the given path and creates a new parser configuration for it.
sourcepub fn for_string(spec: String) -> Self
pub fn for_string(spec: String) -> Self
Creates a new parser configuration for the given specification.
sourcepub fn for_named_spec(name: String, spec: String) -> Self
pub fn for_named_spec(name: String, spec: String) -> Self
Creates a new parser configuration for the given specification using the name as file name.
sourcepub fn parse(self) -> Result<RtLolaAst, RtLolaError>
pub fn parse(self) -> Result<RtLolaAst, RtLolaError>
Invokes the parser on the specification given in the configuration.
Trait Implementations§
source§impl Clone for ParserConfig
impl Clone for ParserConfig
source§fn clone(&self) -> ParserConfig
fn clone(&self) -> ParserConfig
Returns a copy 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 ParserConfig
impl Debug for ParserConfig
source§impl From<ParserConfig> for Handler
impl From<ParserConfig> for Handler
source§fn from(cfg: ParserConfig) -> Self
fn from(cfg: ParserConfig) -> Self
Converts to this type from the input type.