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<'a> From<&'a ParserConfig> for Handler<'a>
impl<'a> From<&'a ParserConfig> for Handler<'a>
Source§fn from(cfg: &'a ParserConfig) -> Self
fn from(cfg: &'a ParserConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParserConfig
impl RefUnwindSafe for ParserConfig
impl Send for ParserConfig
impl Sync for ParserConfig
impl Unpin for ParserConfig
impl UnwindSafe for ParserConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more