relay_event_normalization::user_agent

Trait FromUserAgentInfo

source
pub trait FromUserAgentInfo: Sized {
    // Required methods
    fn parse_client_hints(client_hints: &ClientHints<&str>) -> Option<Self>;
    fn parse_user_agent(user_agent: &str) -> Option<Self>;

    // Provided method
    fn from_hints_or_ua(raw_info: &RawUserAgentInfo<&str>) -> Option<Self> { ... }
}
Expand description

Computes a Context from either a user agent string and client hints.

Required Methods§

source

fn parse_client_hints(client_hints: &ClientHints<&str>) -> Option<Self>

Tries to populate the context from client hints.

source

fn parse_user_agent(user_agent: &str) -> Option<Self>

Tries to populate the context from a user agent header string.

Provided Methods§

source

fn from_hints_or_ua(raw_info: &RawUserAgentInfo<&str>) -> Option<Self>

Tries to populate the context from client hints or a user agent header string.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromUserAgentInfo for BrowserContext

source§

fn parse_client_hints(client_hints: &ClientHints<&str>) -> Option<Self>

source§

fn parse_user_agent(user_agent: &str) -> Option<Self>

source§

impl FromUserAgentInfo for DeviceContext

source§

fn parse_client_hints(client_hints: &ClientHints<&str>) -> Option<Self>

source§

fn parse_user_agent(user_agent: &str) -> Option<Self>

source§

impl FromUserAgentInfo for OsContext

source§

fn parse_client_hints(client_hints: &ClientHints<&str>) -> Option<Self>

source§

fn parse_user_agent(user_agent: &str) -> Option<Self>

Implementors§