Parse a user-agent string into its browser, OS and device components.
Semantics follow uap-python: per domain, rules are tried in order and
the first match wins; a domain whose rules all miss reports family
"Other" with every other field None. Parsing never fails with the
precompiled rule set, so the returned Result is always Ok today.
Example: parse("Mozilla/5.0 (Windows NT 10.0; Win64; x64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36")
yields Ok with browser Chrome 120.0.0, OS Windows 10, and device
family "Other".
T-09 — with_rule_index (optional, default false): when true, each
component's rule_index is Some(i) where i is the 0-based position
of the rule that produced that component within its domain's rule list
(@rules.ua_rules / @rules.os_rules / @rules.device_rules, i.e. the
uap-core regexes.yaml rule order for user_agent_parsers /
os_parsers / device_parsers). A domain whose rules all miss reports
rule_index: None — the "Other" fallback is not produced by any
rule. The index is diagnostic metadata only: parsing behavior is
identical with and without it. With the default with_rule_index=false
every rule_index is None, so results are byte-identical to
pre-T-09 output (backward-compatible: parse(ua) keeps its meaning).