Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
X.500 distinguished name
type _ k =
| CN : string k
| Serialnumber : string k
| C : string k
| L : string k
| SP : string k
| O : string k
| OU : string k
| T : string k
| DNQ : string k
| Mail : string k
| DC : string k
| Given_name : string k
| Surname : string k
| Initials : string k
| Pseudonym : string k
| Generation : string k
| Other : Asn.oid -> string k
The polymorphic variant of a distinguished name component, as defined in X.500.
A distinguished name is a list of component
.
include Gmap.S with type 'a key = 'a k
type 'a key = 'a k
The type for map keys whose lookup value is 'a
.
val empty : t
empty
is the empty map.
singleton key value
creates a one-element map that contains a binding value
for key
.
val is_empty : t -> bool
is_empty m
returns true
if the map m
is empty, false
otherwise.
val cardinal : t -> int
cardinal m
returns the number of bindings of the map m
.
find key m
returns Some v
if the binding of key
in m
is v
, or None
if key
is not bound m
.
add_unless_bound key value m
returns Some m'
, a map containing the same bindings as m
, plus a binding of key
to value
. Or, None
if key
was already bound in m
.
add key value m
returns a map containing the same bindings as m
, plus a binding of key
to value
. If key
was already bound in m
, the previous binding disappears.
remove key m
returns a map containing the same bindings as m
, except for key
which is not bound in the returned map. If key
was not bound in m
, m
is returned unchanged.
update k f m
returns a map containing the same bindings as m
, except for the binding v
of k
. Depending the value of v
, which is f (find k m)
, the binding of k
is added, removed, or updated.
bindings m
returns the list of all bindings in the given map m
. The list is sorted with respect to the ordering over the type of the keys.
The function type for the equal operation, using a record type for "first-class" semi-explicit polymorphism.
The function type for the map operation, using a record type for "first-class" semi-explicit polymorphism.
map f m
returns a map with the same domain as m
, where the associated binding b
has been replaced by the result of the application of f
to b
. The bindings are passed to f
in increasing order with respect to the ordering over the type of the keys.
iter f m
applies f
to all bindings in m
. The bindings are passed in increasing order with respect to the ordering over the type of keys.
fold f m acc
computes (f bN .. (f b1 acc))
, where b1 .. bN
are the bindings of m
in increasing order with respect to the ordering over the type of the keys.
for_all p m
checks if all bindings of the map m
satisfy the predicate p
.
exists p m
checks if at least one binding of the map m
satisfies p
.
filter p m
returns the map with all the bindings in m
that satisfy p
.
The function type for the merge operation, using a record type for "first-class" semi-explicit polymorphism.
merge f m m'
computes a map whose keys is a subset of keys of m
and m'
. The presence of each such binding, and the corresponding value, is determined with the function f
.
The function type for the union operation, using a record type for "first-class" semi-explicit polymorphism.
val pp : t Fmt.t
pp ppf dn
pretty-prints the distinguished name.
val decode_der : Cstruct.t -> (t, [> Rresult.R.msg ]) Rresult.result
decode_der cs
is dn
, the ASN.1 decoded distinguished name of cs
.
val encode_der : t -> Cstruct.t
encode_der dn
is cstruct
, the ASN.1 encoded representation of the distinguished name dn
.