pub enum Query<V, E> {
Get(Path, RespondOne<V, ()>),
GetTree(Path, RespondMany<V, ()>),
GetRange((Bound<Path>, Bound<Path>), RespondMany<V, ()>),
GetAll(RespondMany<V, ()>),
Upsert(Path, RespondOne<V, E>),
Insert(RespondMany<V, Keyed<E>>),
}Expand description
A query to the KV store.
Type parameter V is the value type of the KV store. (The key type is Path.)
The parameter E is type for events that can update a value. In other words,
the inner state machine at each Path receives events type E and manages state type V.
The functions of type RespondOne and RespondMany are passed the query result.
Results contain borrowed values &V which can’t be passed to channels or
other data structures. The respond function may clone these to pass them on,
or the function may interpret or aggregate borrowed values in place.
Variants§
Get(Path, RespondOne<V, ()>)
Get the value at the given path, or None.
GetTree(Path, RespondMany<V, ()>)
Get the entries whose path starts with the given path, including the entry for the path itself.
GetRange((Bound<Path>, Bound<Path>), RespondMany<V, ()>)
Get the entries in the given range
GetAll(RespondMany<V, ()>)
Get all the entries
Upsert(Path, RespondOne<V, E>)
Get the value at the given path or None and emit an event for that path.
Insert(RespondMany<V, Keyed<E>>)
Get all the entries and emit an event for a particular (usually new) path.