pub struct Parser {
pub ua_regex: Vec<UserAgentParser>,
pub devices_regex: Vec<DeviceParser>,
pub os_regex: Vec<OSParser>,
}
Expand description
The Parser
type, used for parsing user agent strings into Client
structs.
Fields§
§ua_regex: Vec<UserAgentParser>
§devices_regex: Vec<DeviceParser>
§os_regex: Vec<OSParser>
Implementations§
Source§impl Parser
impl Parser
Sourcepub fn from_file(regexes_file: &str) -> Result<Parser, Error>
pub fn from_file(regexes_file: &str) -> Result<Parser, Error>
Constructs a Parser
from a file path to a regexes file.
See uap-core documentation for information on the file format.
Sourcepub fn from_str(s: &str) -> Result<Parser, Error>
pub fn from_str(s: &str) -> Result<Parser, Error>
Constructs a Parser
from an str containing regexes.
See uap-core documentation for information on the format.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Parser
impl !RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl !UnwindSafe for Parser
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