Knowledge.PersistentPersistence type class.
A instance of the Persistent type class could be provided to the property declaration to make this property persistent. See the Class.property function.
type 'a t = 'a persistentval define :
to_string:('a -> string) ->
of_string:(string -> 'a) ->
'a persistentdefine to_string of_string derives an instance of persistent.
Uses the provided of_string and to_string to deserialize and serialize properties.
val derive :
to_persistent:('a -> 'b) ->
of_persistent:('b -> 'a) ->
'b persistent ->
'a persistentderive to_persistent of_persistent derives an instance from other instance.
val of_binable :
(module Core_kernel.Binable.S with type t = 'a) ->
'a persistentof_binable t derives persistent from the binable instance t.
val string : string persistentstring is a persistent data type.
val name : name persistentnames are persistent.
val list : 'a persistent -> 'a list persistentlist t derives persistence for a list.
val sequence : 'a persistent -> 'a Core_kernel.Sequence.t persistentsequence t derives persistent for a sequence.
val array : 'a persistent -> 'a array persistentarray t derives persistent for an array.
val set :
('a, 'c) Core_kernel.Set.comparator ->
'a t ->
('a, 'c) Core_kernel.Set.t persistentset order t derives persistent for a set.
val map :
('k, 'c) Core_kernel.Map.comparator ->
'k t ->
'd t ->
('k, 'd, 'c) Core_kernel.Map.t persistentmap order t derives persistent for a map.