reproto_core/
option_entry.rs

1use RpNumber;
2use errors::Result;
3
4pub trait OptionEntry {
5    /// Get the name of the option.
6    fn name(&self) -> &str;
7
8    /// Get the value as a string.
9    fn as_string(&self) -> Result<String>;
10
11    /// Get the value as an 32-bit unsigned integer.
12    fn as_number(&self) -> Result<RpNumber>;
13
14    /// Get the value as an identifier.
15    fn as_identifier(&self) -> Result<String>;
16}