HttpParser

Trait HttpParser 

Source
pub trait HttpParser {
    // Required methods
    fn supported_version(&self) -> Version;
    fn can_parse(&self, data: &[u8]) -> bool;
    fn name(&self) -> &'static str;
    fn parse_request(&self, data: &[u8]) -> Option<ObservableHttpRequest>;
    fn parse_response(&self, data: &[u8]) -> Option<ObservableHttpResponse>;
}
Expand description

Common trait for all HTTP parsers across different versions

Required Methods§

Source

fn supported_version(&self) -> Version

Get the HTTP version this parser supports

Source

fn can_parse(&self, data: &[u8]) -> bool

Check if this parser can handle the given data

Source

fn name(&self) -> &'static str

Get a human-readable name for this parser

Source

fn parse_request(&self, data: &[u8]) -> Option<ObservableHttpRequest>

Parse HTTP request data into observable signals Returns None if data cannot be parsed by this parser

Source

fn parse_response(&self, data: &[u8]) -> Option<ObservableHttpResponse>

Parse HTTP response data into observable signals
Returns None if data cannot be parsed by this parser

Implementors§