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§

source

fn supported_format_list(&self) -> Vec<String>

Supported format list (e.g. “yml”)

source

fn try_parse(&self, bytes: &[u8]) -> Result<Input, ConfigurationParserError>

Parses a byte slice to Input.

source

fn is_format_supported(&self, bytes: &[u8]) -> Option<bool>

Checks if provided byte slice is ok for future parsing.

Implementors§