package git

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Blob.MakeSource

The functor to make the OCaml representation of the Git Blob object by a specific hash implementation.

Parameters

module Hash : sig ... end

Signature

Sourcetype t

The Git Blob is structurally a Cstruct.t independantly of the hash implementation.

Sourcemodule MakeMeta (Meta : Encore.Meta.S) : sig ... end
Sourcemodule A : sig ... end
Sourcemodule M : sig ... end
Sourcemodule D : sig ... end
Sourcemodule E : sig ... end
Sourceval digest : t -> Hash.t
Sourceval pp : t Fmt.t
Sourceval compare : t -> t -> int
Sourceval hash : t -> int
Sourceval equal : t -> t -> bool
Sourcemodule Set : Set.S with type elt = t
Sourcemodule Map : Map.S with type key = t
Sourceval length : t -> int64

length t returns the length of the blob object t. Note that we use Cstruct.t.len and cast result to int64.

Sourceval of_cstruct : Cstruct.t -> t

of_cstruct cs returns the blob value of a Cstruct.t. This function does not take the ownership on cs. So, consider at this time to not change cs and consider it as a constant.

Sourceval to_cstruct : t -> Cstruct.t

to_cstruct blob returns the Cstruct.t of the Blob blob. This function does not create a fresh Cstruct.t, so consider it as a constant Cstruct.t (set functions not allowed).

Sourceval of_string : string -> t

of_string s returns the blob value of a string.

Sourceval to_string : t -> string

to_string blob returns a string which contains the blob value - in other words, the content of your file.

OCaml

Innovation. Community. Security.