pub struct OperatorParser { /* private fields */ }Expand description
§Core Parser with Recovery (Improvement #10)
Implementations§
Source§impl OperatorParser
impl OperatorParser
Sourcepub async fn new() -> Result<Self, ParseError>
pub async fn new() -> Result<Self, ParseError>
pub async fn load_hlx(&mut self) -> Result<(), ParseError>
pub fn parse_value<'a>( &'a mut self, raw: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Value, ParseError>> + Send + 'a>>
pub async fn parse_line(&mut self, raw: &str) -> Result<(), ParseError>
pub fn evaluate_expression<'a>( &'a mut self, expr: &'a Expression, ) -> Pin<Box<dyn Future<Output = Result<Value, ParseError>> + Send + 'a>>
pub fn parse<'a>( &'a mut self, content: &'a str, ) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Value>, ParseError>> + Send + 'a>>
pub fn parse_file<'a>( &'a mut self, path: &'a str, ) -> Pin<Box<dyn Future<Output = Result<(), ParseError>> + Send + 'a>>
pub fn get(&self, key: &str) -> Option<Value>
pub fn get_ref(&self, key: &str) -> Option<&Value>
pub fn set(&mut self, key: &str, value: Value)
pub fn keys(&self) -> Vec<String>
pub fn items(&self) -> &HashMap<String, Value>
pub fn items_cloned(&self) -> HashMap<String, Value>
pub fn get_errors(&self) -> &[ParseError]
pub fn has_errors(&self) -> bool
Auto Trait Implementations§
impl Freeze for OperatorParser
impl RefUnwindSafe for OperatorParser
impl Send for OperatorParser
impl Sync for OperatorParser
impl Unpin for OperatorParser
impl UnwindSafe for OperatorParser
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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