glitr/route

Types

pub type Route(
  path_type,
  query_type,
  req_body_type,
  res_body_type,
) {
  Route(
    method: http.Method,
    path: path.RoutePath(path_type),
    query: query.RouteQuery(query_type),
    req_body: body.RouteBody(req_body_type),
    res_body: body.RouteBody(res_body_type),
  )
}

Constructors

  • Route(
      method: http.Method,
      path: path.RoutePath(path_type),
      query: query.RouteQuery(query_type),
      req_body: body.RouteBody(req_body_type),
      res_body: body.RouteBody(res_body_type),
    )

Functions

pub fn new() -> Route(Nil, Nil, Nil, Nil)
pub fn with_method(
  route: Route(a, b, c, d),
  method: Method,
) -> Route(a, b, c, d)
pub fn with_path(
  route: Route(a, b, c, d),
  path: RoutePath(e),
) -> Route(e, b, c, d)
pub fn with_query(
  route: Route(a, b, c, d),
  query: RouteQuery(e),
) -> Route(a, e, c, d)
pub fn with_request_body(
  route: Route(a, b, c, d),
  req_body: RouteBody(e),
) -> Route(a, b, e, d)
pub fn with_response_body(
  route: Route(a, b, c, d),
  res_body: RouteBody(e),
) -> Route(a, b, c, e)
Search Document