Page
Library
Module
Module type
Parameter
Class
Class type
Source
Mirage_kv.Key
SourceThe type for structured keys.
v s
is the string s
as a key. A key "/foo/bar"
is decomposed into the segments "foo"
and "bar"
. The initial "/"
is always ignored so "foo/bar"
and "/foo/bar"
are equal.
add t s
is the concatenated key t/s
. Raise Invalid_argument
if s
contains "/"
.
basename t
is the last segment of t
. basename empty
is the empty string ""
.
parent t
is the key without the last segment. parent empty
is empty
.
For any t
, the invariant have parent t / basename t
is t
.