module Hash : sig ... endmodule Inflate : sig ... endmodule Deflate : sig ... endmodule Value : S with module Hash := Hash and module Inflate := Inflate and module Deflate := Deflateinclude module type of Value
type t = | Blob of Blob.t | The |
| Commit of Commit.t | The |
| Tree of Tree.t | The |
| Tag of Tag.t | The |
OCaml value which represents a Git object.
val kind : t -> [ `Commit | `Blob | `Tree | `Tag ]kind o returns the kind of the Git object.
val pp_kind : [ `Commit | `Blob | `Tree | `Tag ] Fmt.tpp_kind ppf kind is a human readable pretty-printer of kind.
module MakeMeta : functor (Meta : Encore.Meta.S) -> sig ... endmodule A : sig ... endmodule M : sig ... endmodule D : sig ... endmodule E : sig ... endval length : t -> int64module EncoderRaw : sig ... endmodule DecoderRaw : sig ... endmodule EncoderWithoutHeader : sig ... endval to_deflated_raw : raw:Cstruct.t -> etmp:Cstruct.t -> ?level:int -> ztmp:Cstruct.t -> t -> (string, E.error) Stdlib.resultto_deflated_raw ?capacity ?level ~ztmp value serializes and deflates the value value. capacity is the memory consumption of the encoder in bytes (default to 0x100), level is the level of the compression (default to 4) and ztmp is an internal buffer used to store the serialized value before the deflation.
All error from the Deflate module is relayed to the `Deflate error value.
val to_raw : raw:Cstruct.t -> etmp:Cstruct.t -> t -> (string, EncoderRaw.error) Stdlib.resultto_raw ?capacity value serializes the value value. capacity is the memory consumption of the encoder in bytes (default to 0x100).
This function can not returns an EE.error (see EE).
val to_raw_without_header : raw:Cstruct.t -> etmp:Cstruct.t -> t -> (string, EncoderWithoutHeader.error) Stdlib.resultval of_raw : kind:[ `Commit | `Blob | `Tree | `Tag ] -> Cstruct.t -> (t, Error.Decoder.t) Stdlib.resultof_raw ~kind inflated makes a Git object as an OCaml value t. This decoder does not expect an header to recognize which kind of Git object is it. That means the inflated raw should not contain kind
size\000 at the beginning (in this case, you should use of_raw_with_header.
val of_raw_with_header : Cstruct.t -> (t, DecoderRaw.error) Stdlib.resultof_raw_with_header inflated makes a Git object as an OCaml value t. This decoder expects an header to choose which Git object it is.