type error = [ | `Expected_char of char | Appears when we encountered an other character than what we expected stricly. |
| `Unexpected_char of char | Appears when we encountered a character and we don't know what we can do with this. |
| `Unexpected_flush_pkt_line | Appears when we encountered a flush packet and we don't expect this. |
| `No_assert_predicate of char -> bool | Appears when one character does not respect the predicate. |
| `Expected_string of string | Appears when we don't have strictly the string expected. |
| `Unexpected_empty_pkt_line | Appears when we encountered an empty packet and we don't expect this. |
| `Malformed_pkt_line | Appears when we encountered a flow which does not respect the packet format. |
| `Unexpected_end_of_input | |
| `Unexpected_pkt_line | |
| `Unexpected_hashes of Hash.t * Hash.t |
]The type error.
type 'a state = | Ok of 'a | The end value of the decoding. | ||||
| Read of {
} | Means that we expect an input. We provide an | ||||
| Error of {
} | When we retrieve an error, we return this value with how many byte(s) we processed and the current input. |
type _ transaction = | HttpReferenceDiscovery : string -> (Common.advertised_refs, [ `Msg of string ]) Stdlib.result transaction |
| ReferenceDiscovery : (Common.advertised_refs, [ `Msg of string ]) Stdlib.result transaction |
| ShallowUpdate : Common.shallow_update transaction |
| Negociation : Hash.Set.t * ack_mode -> Common.acks transaction |
| NegociationResult : Common.negociation_result transaction |
| PACK : side_band -> flow transaction |
| ReportStatus : string list * side_band -> Common.report_status transaction |
| HttpReportStatus : string list * side_band -> Common.report_status transaction |
| Upload_request : Common.upload_request transaction |
| Git_proto_request : Common.git_proto_request transaction |
| Update_request : Common.update_request transaction |
The type transaction to describe what is expected to decode/receive.
The ACK mode type to describe which mode is shared by the client and the server.
The representation of the output side-band.
The side-band mode type to describe which mode is shared by the client and the server.
val decode : decoder -> 'result transaction -> 'result statedecode decoder transaction decodes the input represented by decoder in the way of the transaction and returns the value expected and described by transaction or an error.
val decoder : unit -> decoderdecoder () makes a new decoder.
val of_string : string -> 'v transaction -> ('v, error * Cstruct.t * int) Stdlib.result