package plebeia

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

Module Test_utils.DumbSource

Sourcetype context = unit
Sourcetype error = string
Sourcetype t
Sourcetype cursor
Sourceval get_node : cursor -> t
Sourceval empty : context -> cursor

Creates a cursor to a new, empty tree.

Sourceval subtree : cursor -> segment -> (cursor, error) result

Moves the cursor down a segment, to the root of a sub-tree. Think "cd segment/"

Sourceval create_subtree : cursor -> segment -> (cursor, error) result

Create a subtree (bud). Think "mkdir segment"

Sourceval parent : cursor -> (cursor, error) result

Moves the cursor back to the parent tree. Think "cd .."

Sourceval get_value : cursor -> segment -> (value, error) result

Gets a value if present in the current tree at the given segment.

Sourceval insert : cursor -> segment -> value -> (cursor, error) result

Inserts a value at the given segment in the current tree. Returns the new cursor if successful.

Sourceval upsert : cursor -> segment -> value -> (cursor, error) result

Upserts. This can still fail if the segment leads to a subtree.

Sourceval delete : cursor -> segment -> (cursor, error) result

Delete a leaf or subtree.

Sourceval of_plebeia_node : Plebeia.Context.t -> Plebeia.Node.node -> t
Sourceval dot_of_node : t -> string
Sourceval dot_of_cursor : cursor -> string
OCaml

Innovation. Community. Security.