Crate gix_object

Source
Expand description

This crate provides types for read-only git objects backed by bytes provided in git’s serialization format as well as mutable versions of these. Both types of objects can be encoded.

§Feature Flags

  • serde — Data structures implement serde::Serialize and serde::Deserialize.
  • verbose-object-parsing-errors — When parsing objects by default errors will only be available on the granularity of success or failure, and with the above flag enabled details information about the error location will be collected. Use it in applications which expect broken or invalid objects or for debugging purposes. Incorrectly formatted objects aren’t at all common otherwise.

Re-exports§

Modules§

Structs§

  • A mutable chunk of any data.
  • A chunk of any data.
  • A mutable git commit, representing an annotated state of a working tree along with a reference to its historical commits.
  • A git commit parsed using from_bytes().
  • Like CommitRef, but as Iterator to support (up to) entirely allocation free parsing. It’s particularly useful to traverse the commit graph without ever allocating arrays for parents.
  • A borrowed object using a slice as backing buffer, or in other words a bytes buffer that knows the kind of object it represents.
  • Information about an object, which includes its kind and the amount of bytes it would have when obtained.
  • A mutable git tag.
  • Represents a git tag, commonly indicating a software release.
  • Like TagRef, but as Iterator to support entirely allocation free parsing. It’s particularly useful to dereference only the target chain.
  • A mutable Tree, containing other trees, blobs or commits.
  • A directory snapshot containing files (blobs), directories (trees) and submodules (commits).
  • A directory snapshot containing files (blobs), directories (trees) and submodules (commits), lazily evaluated.

Enums§

  • The four types of objects that git differentiates.
  • Mutable objects with each field being separately allocated and changeable.
  • Immutable objects are read-only structures referencing most data from a byte slice.

Traits§

  • Check if an object is present in an object store.
  • Find an object in the object store.
  • An extension trait with convenience functions.
  • Find the header of an object in the object store.
  • A combination of Find and Header traits to help with dyn trait objects.
  • An extension trait with convenience functions.
  • Describe the capability to write git objects into an object store.
  • Writing of objects to a Write implementation

Functions§

  • A function to compute a hash of kind hash_kind for an object of object_kind and its data.
  • A function to compute a hash of kind hash_kind for an object of object_kind and its data read from stream which has to yield exactly stream_len bytes. Use progress to learn about progress in bytes processed and should_interrupt to be able to abort the operation if set to true.