Struct reproto_core::Options
[−]
[src]
pub struct Options { /* fields omitted */ }
Helper for looking up and dealing with options.
Methods
impl Options
[src]
fn new(options: Vec<Loc<RpOptionDecl>>) -> Options
[src]
fn lookup<'a>(
&'a self,
name: &'a str
) -> Box<Iterator<Item = &Loc<RpValue>> + 'a>
[src]
&'a self,
name: &'a str
) -> Box<Iterator<Item = &Loc<RpValue>> + 'a>
fn find_one<'a>(&'a self, name: &'a str) -> Result<Option<&'a Loc<RpValue>>>
[src]
fn find_all_strings(&self, name: &str) -> Result<Vec<Loc<String>>>
[src]
Find all strings matching the given name.
This enforces that all found values are strings, otherwise the lookup will cause an error.
fn find_all_numbers(&self, name: &str) -> Result<Vec<Loc<RpNumber>>>
[src]
fn find_one_identifier(&self, name: &str) -> Result<Option<Loc<String>>>
[src]
Optionally find exactly one identifier matching the given name.
This enforces that all found values are identifiers, otherwise the lookup will cause an error.
fn find_one_string(&self, name: &str) -> Result<Option<Loc<String>>>
[src]
fn find_one_number(&self, name: &str) -> Result<Option<Loc<RpNumber>>>
[src]
fn find_one_boolean(&self, name: &str) -> Result<Option<Loc<bool>>>
[src]
fn find_all_identifiers(&self, name: &str) -> Result<Vec<Loc<String>>>
[src]
Find all identifiers matching the given name.
This enforces that all found values are identifiers, otherwise the lookup will cause an error.