Vif_core.RouteSourceTop level atoms are specialized for path and query, see documentation.
Extracting atom is just a matter of following the witness. We just need to take care of counting where we are in the matching groups.
val extract_path :
'f 'x 'r. original:string ->
('f, 'x) re_path ->
Re.Group.t ->
('x -> 'r) ->
'f ->
'rSince path is in reversed order, we proceed by continuation.
Query are in the right order, we can proceed in direct style.
type 'socket request = {extract : 'c 'a. [ `CONNECT
| `DELETE
| `GET
| `HEAD
| `OPTIONS
| `POST
| `PUT
| `TRACE
| `Other of string ]
option ->
('c, 'a) Vif_core__.Vif_type.t ->
('socket, 'c, 'a) Vif_core__.Vif_request.t option;}val match_ :
((Re.re * 'a) Vif_core__.Vif_method.Map.t * (Re.re * 'a)) ->
[ `CONNECT
| `DELETE
| `GET
| `HEAD
| `OPTIONS
| `POST
| `PUT
| `TRACE
| `Other of string ] ->
string ->
(Re.Group.t * 'a) option