package opium

  1. Overview
  2. Docs

Module Opium.RouteSource

Expression that represent a target or multiple

Sourcetype t
Sourcetype matches = {
  1. params : (string * string) list;
  2. splat : string list;
}
Sourceval sexp_of_matches : matches -> Sexplib0.Sexp.t

sexp_of_t matches converts the matches matches to an s-expression

Sourceval of_string : string -> t

of_string s returns a route from its string representation s.

Sourceval to_string : t -> string

to_string t returns a string representation of the route t.

Sourceval match_url : t -> string -> matches option

match_url t url return the matches of the url url for the route t, or None if the url does not match.

OCaml

Innovation. Community. Security.