pub struct UserAgentParser;Implementations§
Source§impl UserAgentParser
impl UserAgentParser
Sourcepub fn parse(ua: &str) -> UserAgentInfo
pub fn parse(ua: &str) -> UserAgentInfo
Parses a user agent string and returns detected information
§Arguments
ua- The user agent string to parse
§Returns
A UserAgentInfo struct containing the parsed information
§Example
use agent_parser_ro::UserAgentParser;
let info = UserAgentParser::parse("Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1");Auto Trait Implementations§
impl Freeze for UserAgentParser
impl RefUnwindSafe for UserAgentParser
impl Send for UserAgentParser
impl Sync for UserAgentParser
impl Unpin for UserAgentParser
impl UnsafeUnpin 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