Struct user_agent_parser::UserAgentParser
source · pub struct UserAgentParser { /* private fields */ }
Implementations§
source§impl UserAgentParser
impl UserAgentParser
sourcepub fn from_path<P: AsRef<Path>>(
path: P
) -> Result<UserAgentParser, UserAgentParserError>
pub fn from_path<P: AsRef<Path>>( path: P ) -> Result<UserAgentParser, UserAgentParserError>
Read the list of regular expressions (YAML data) from a file to create a UserAgentParser
instance.
sourcepub fn from_str<S: AsRef<str>>(
yaml: S
) -> Result<UserAgentParser, UserAgentParserError>
pub fn from_str<S: AsRef<str>>( yaml: S ) -> Result<UserAgentParser, UserAgentParserError>
Read the list of regular expressions (YAML data) from a string to create a UserAgentParser
instance.
source§impl UserAgentParser
impl UserAgentParser
pub fn parse_product<'a, S: AsRef<str> + ?Sized>( &'a self, user_agent: &'a S ) -> Product<'a>
pub fn parse_os<'a, S: AsRef<str> + ?Sized>( &'a self, user_agent: &'a S ) -> OS<'a>
pub fn parse_device<'a, S: AsRef<str> + ?Sized>( &'a self, user_agent: &'a S ) -> Device<'a>
pub fn parse_cpu<'a, S: AsRef<str> + ?Sized>( &'a self, user_agent: &'a S ) -> CPU<'a>
pub fn parse_engine<'a, S: AsRef<str> + ?Sized>( &'a self, user_agent: &'a S ) -> Engine<'a>
Trait Implementations§
source§impl Debug for UserAgentParser
impl Debug for UserAgentParser
Auto Trait Implementations§
impl RefUnwindSafe for UserAgentParser
impl Send for UserAgentParser
impl Sync for UserAgentParser
impl Unpin for UserAgentParser
impl UnwindSafe for UserAgentParser
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more