package git

  1. Overview
  2. Docs

User actions.

type tz_offset = {
  1. sign : [ `Plus | `Minus ];
  2. hours : int;
  3. min : int;
}

Signed offset of time zone from UTC.

type t = {
  1. name : string;
  2. email : string;
  3. date : int64 * tz_offset option;
}

A user action has a (user) name, an (user) email and an (action) date. The date is the number of seconds since 12:00 midnight January 1, 1970, UTC without accounting for leap seconds with an optional timezone info.

include IO with type t := t

Input/output functions

include S with type t := t
val equal : t -> t -> bool

Are two objects equal?

val hash : t -> int

Hash an object.

val compare : t -> t -> int

Compare two objects.

val pp : t Fmt.t

pp is the pretty-printer for values of type t.

val input : Mstruct.t -> t

Build a value from an inflated contents.

val add : Buffer.t -> ?level:int -> t -> unit

Add the serialization of the value to an already existing buffer.

The compression level must be between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all (the input data is simply copied a block at a time). The default value (currently equivalent to level 6) requests a default compromise between speed and compression.

OCaml

Innovation. Community. Security.