package jsoo_router

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module is the entry point for Routing manipulation.

Exceptions

exception Runtime_error of string

Exceptions throwed when a runtime error is occured

Utils functions

val get_hash : unit -> string

Router.get_hash () returns the value of the current hash

val set_hash : string -> unit

Router.set_hash "foo" sets the current hash with #foo

val clean_hash : unit -> unit

Router.clean_hash () remove the hash

Routing functions

val start : (unit -> 'a) -> unit

Router.start f starts routing

val get_route : unit -> string

Router.get_route is equals to Router.get_hash

val set_route : string -> unit

Router.set_route is equals to Router.set_hash

val clean_route : unit -> unit

Router.clean_route is equals to Router.clean_hash

Coersion functions

Those functions are used for the extension point (PPX) and should not be uses

val coersion_int : string option -> int
val coersion_float : string option -> float
val coersion_bool : string option -> bool
val coersion_char : string option -> char
val coersion_string : string option -> string
val is_some : 'a option -> bool
val raise_ : string -> 'a