anchor.diff:  -export([metadata/1]).
   -export([constraints/1]).
   
  +
   -opaque trail() ::
     #{ path_match  => cowboy_router:route_match()
      , constraints => cowboy_router:constraints()
  
positive.code: 
  -type metadata() :: #{method() => map()}.
  
  -spec single_host_compile([cowboy_router:route_path()]) ->
    cowboy_router:dispatch_rules().
  single_host_compile(Trails) ->
    compile([{'_', Trails}]).
  
  -spec compile([{Host::cowboy_router:route_match(), Trails::trails()}]) ->
    cowboy_router:dispatch_rules().
  compile([]) -> [];
  compile(Routes) ->
    cowboy_router:compile(
      [{Host, to_route_paths(Trails)} || {Host, Trails} <- Routes]).
  
    -spec to_route_paths(trail()) -> cowboy_router:route_path().
  to_route_paths(Paths) ->
    [to_route_path(Path)|| Path <- Paths].
  
  -spec to_route_path(trail()) -> cowboy_router:route_path().
  to_route_path(Trail) when is_map(Trail) ->
    PathMatch = maps:get(path_match, Trail),
    ModuleHandler = maps:get(handler, Trail),
  
negative.code: to_route_path(Trail) when is_tuple(Trail) ->
    Trail.
  
  -spec trail(route_match()
            , module()) -> trail().
  trail(PathMatch, ModuleHandler) ->
    trail(PathMatch, ModuleHandler, [], #{}, []).
  
  -spec trail(route_match()
            , module()
            , any()) -> trail().
  trail(PathMatch, ModuleHandler, Options) ->
    trail(PathMatch, ModuleHandler, Options, #{}, []).
  
  -spec trail(route_match()
            , module()
            , any()
            , map()) -> trail().
  trail(PathMatch, ModuleHandler, Options, MetaData) ->
    trail(PathMatch, ModuleHandler, Options, MetaData, []).
  
  -spec trail(route_match()
            , module()
            , any()
            , map()
  