Swim.Codec
swim · API reference
val encode_ping : Types.Wire.ping -> Msgpck.tval decode_ping : Msgpck.t -> (Types.Wire.ping, string) resultval encode_indirect_ping : Types.Wire.indirect_ping_req -> Msgpck.tval decode_indirect_ping :
Msgpck.t ->
(Types.Wire.indirect_ping_req, string) resultval encode_ack : Types.Wire.ack_resp -> Msgpck.tval decode_ack : Msgpck.t -> (Types.Wire.ack_resp, string) resultval encode_nack : Types.Wire.nack_resp -> Msgpck.tval decode_nack : Msgpck.t -> (Types.Wire.nack_resp, string) resultval encode_suspect : Types.Wire.suspect -> Msgpck.tval decode_suspect : Msgpck.t -> (Types.Wire.suspect, string) resultval encode_alive : Types.Wire.alive -> Msgpck.tval decode_alive : Msgpck.t -> (Types.Wire.alive, string) resultval encode_dead : Types.Wire.dead -> Msgpck.tval decode_dead : Msgpck.t -> (Types.Wire.dead, string) resultval encode_compress : Types.Wire.compress -> Msgpck.tval decode_compress : Msgpck.t -> (Types.Wire.compress, string) resultval wire_msg_to_msgpck :
Types.Wire.protocol_msg ->
Types.Wire.message_type * Msgpck.tval encode_msg_to_cstruct :
Types.Wire.protocol_msg ->
buf:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval decode_msg_from_cstruct :
Cstruct.t ->
(Types.Wire.protocol_msg, Types.decode_error) resultval crc32_table : int32 arrayval crc32_cstruct : Cstruct.t -> int32val add_crc_to_cstruct :
src:Cstruct.t ->
src_len:int ->
dst:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval verify_and_strip_crc : Cstruct.t -> (Cstruct.t, Types.decode_error) resultval add_label_to_cstruct :
label:string ->
src:Cstruct.t ->
src_len:int ->
dst:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval strip_label : Cstruct.t -> (Cstruct.t * string, Types.decode_error) resultval encode_compound_to_cstruct :
msgs:Cstruct.t list ->
msg_lens:int list ->
dst:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval decode_compound_from_cstruct :
Cstruct.t ->
(Cstruct.t list * int, Types.decode_error) resultval encode_internal_msg_to_cstruct :
self_name:string ->
self_port:int ->
Types.protocol_msg ->
buf:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval decode_internal_msg_from_cstruct :
default_port:int ->
Cstruct.t ->
(Types.protocol_msg, Types.decode_error) resultval encode_packet :
Types.packet ->
buf:Cstruct.t ->
(int, [ `Buffer_too_small ]) resultval decode_packet : Cstruct.t -> (Types.packet, Types.decode_error) resultval encoded_size : Types.protocol_msg -> intval encode_internal_msg :
self_name:string ->
self_port:int ->
Types.protocol_msg ->
stringval add_crc : string -> stringval verify_and_strip_crc_string : string -> (string, Types.decode_error) resultval add_label : string -> string -> stringval strip_label_string : string -> (string * string, Types.decode_error) resultval make_compound_msg : string list -> stringval decode_compound_msg :
string ->
(string list * int, Types.decode_error) resultval encode_push_pull_header : Types.Wire.push_pull_header -> Msgpck.tval decode_push_pull_header :
Msgpck.t ->
(Types.Wire.push_pull_header, string) resultval encode_push_node_state : Types.Wire.push_node_state -> Msgpck.tval decode_push_node_state :
Msgpck.t ->
(Types.Wire.push_node_state, string) resultval encode_push_pull_msg :
header:Types.Wire.push_pull_header ->
nodes:Types.Wire.push_node_state list ->
user_state:string ->
stringval decode_push_pull_msg :
string ->
(Types.Wire.push_pull_header * Types.Wire.push_node_state list * string,
Types.decode_error)
resultval decode_compress_from_cstruct :
Cstruct.t ->
(int * Cstruct.t, Types.decode_error) resultval decode_push_pull_msg_cstruct :
Cstruct.t ->
(Types.Wire.push_pull_header * Types.Wire.push_node_state list * Cstruct.t,
Types.decode_error)
result