Brassaia.Path
Store paths.
An Brassaia store binds paths to user-defined contents. Paths are composed by basic elements, that we call steps. The following Path
module provides functions to manipulate steps and paths.
Tree path handling.
val pp_step : Stdlib.Format.formatter -> step -> unit
val step_to_bin_string : step -> string
val step_of_bin_string : string -> (step, [ `Msg of string ]) Stdlib.result
type t = step list
The type for path values.
val pp : Stdlib.Format.formatter -> t -> unit
val empty : t
The empty path.
val is_empty : t -> bool
Check if the path is empty.
Deconstruct the first element of the path. Return None
if the path is empty.
Deconstruct the last element of the path. Return None
if the path is empty.
val encoding : t Data_encoding.t
encoding
is the data_encoding for t
.
val step_encoding : step Data_encoding.t
step_encoding
is the data_encoding for step
.