Trait plugx_config::parser::ConfigurationParser
source · pub trait ConfigurationParser: Send + Sync + Debug {
// Required methods
fn supported_format_list(&self) -> Vec<String>;
fn try_parse(&self, bytes: &[u8]) -> Result<Input, ConfigurationParserError>;
fn is_format_supported(&self, bytes: &[u8]) -> Option<bool>;
}Expand description
A trait to parse configuration contents.
Required Methods§
sourcefn supported_format_list(&self) -> Vec<String>
fn supported_format_list(&self) -> Vec<String>
Supported format list (e.g. “yml”)
sourcefn try_parse(&self, bytes: &[u8]) -> Result<Input, ConfigurationParserError>
fn try_parse(&self, bytes: &[u8]) -> Result<Input, ConfigurationParserError>
Parses a byte slice to Input.
sourcefn is_format_supported(&self, bytes: &[u8]) -> Option<bool>
fn is_format_supported(&self, bytes: &[u8]) -> Option<bool>
Checks if provided byte slice is ok for future parsing.