Module Proto.Rwalk

An Rwalk message responds with the Qid for each traversed element. If no elements were successfully traversed, a server should reply with an Rerror message. Otherwise, the Rwalk message should contain a Qid entry for each path element that was successfully traversed.

type t
val size : t -> int

The size of this message in bytes. It is identical to the length of the underlying I/O vector but is also encoded in the first 4 bytes of the message.

val code : int

The op code for this message.

val tag : t -> Tag.t

An identifier for this transaction. All in-flight requests on a given connection must have unique tags.

val of_iovec : Iovec.t -> t

of_iovec verifies a message from an I/O vector. No copying is done, and of_iovec only performs bounds checks. Modifying the underlying I/O vector will change the results when accessing message fields.

val fold_left : f:('a -> Styx__.Types.Qid.t -> 'a) -> init:'a -> t -> 'a

fold_left ~f calls f on successive elements of the elements in the Rwalk's wqid field.

val nwqid : t -> int

nwqid rwalk is the number of qids in the rwalk.

val alloc : Iovec.ring -> nwqid:int -> t

alloc iov ~tag ~nwqid allocates memory for an Rwalk of up to nwqid elements. The initial message has zero elements. Additional elements can be added with add.

val add : t -> Styx__.Types.Qid.t

incr rwalk extends the Rwalk request by the length of one qid. The qid's contents are initialized to 0.

val commit : t -> tag:Tag.t -> int