You can search for identifiers within the package.
in-package search v0.2.0
bare_encoding
Bare_encoding.Decode
Decoders.
This module provides a decoder type Decode.t to hold the decoding state, along with functions to decode specific primitives.
Decode.t
type t
val of_input : input -> t
create input makes a decoder for the given input.
create input
val of_string : ?off:int -> ?len:int -> string -> t
Decoder reading from the string.
initial offset in the string
length of the slice of the string
Invalid_arg
if off,off+len is not a valid slice in the string.
off,off+len
val of_bytes : ?off:int -> ?len:int -> bytes -> t
See of_string
of_string
type 'a dec = t -> 'a
A decoder for values of type 'a. Decoders will raise Error to indicate failure.
'a
Error
val uint : t -> int64
Decode a varint-encoded unsigned integer
val int : t -> int64
Decode a varint-encoded integer
val u8 : t -> char
val u16 : t -> int
val u32 : t -> int32
val u64 : t -> int64
val i8 : t -> char
val i16 : t -> int
val i32 : t -> int32
val i64 : t -> int64
val bool : t -> bool
val f32 : t -> float
val f64 : t -> float
val string : t -> string
val data : t -> bytes
val data_of : size:int -> t -> bytes
val optional : 'a dec -> 'a option dec