[][src]Struct user_agent_parser::UserAgentParser

pub struct UserAgentParser { /* fields omitted */ }

Methods

impl UserAgentParser[src]

pub fn from_path<P: AsRef<Path>>(
    path: P
) -> Result<UserAgentParser, UserAgentParserError>
[src]

Read the list of regular expressions (YAML data) from a file to create a UserAgentParser instance.

pub fn from_str<S: AsRef<str>>(
    yaml: S
) -> Result<UserAgentParser, UserAgentParserError>
[src]

Read the list of regular expressions (YAML data) from a string to create a UserAgentParser instance.

impl UserAgentParser[src]

pub fn parse_product<'a, S: AsRef<str> + ?Sized>(
    &'a self,
    user_agent: &'a S
) -> Product<'a>
[src]

pub fn parse_os<'a, S: AsRef<str> + ?Sized>(
    &'a self,
    user_agent: &'a S
) -> OS<'a>
[src]

pub fn parse_device<'a, S: AsRef<str> + ?Sized>(
    &'a self,
    user_agent: &'a S
) -> Device<'a>
[src]

pub fn parse_cpu<'a, S: AsRef<str> + ?Sized>(
    &'a self,
    user_agent: &'a S
) -> CPU<'a>
[src]

pub fn parse_engine<'a, S: AsRef<str> + ?Sized>(
    &'a self,
    user_agent: &'a S
) -> Engine<'a>
[src]

Trait Implementations

impl Debug for UserAgentParser[src]

impl FromStr for UserAgentParser[src]

type Err = UserAgentParserError

The associated error which can be returned from parsing.

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]