Docs.rs
  • git-object-0.26.2
    • git-object 0.26.2
    • Permalink
    • Docs.rs crate page
    • MIT/Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Byron
    • Dependencies
      • bstr ^1.0.1 normal
      • btoi ^0.4.2 normal
      • document-features ^0.2.0 normal optional
      • git-actor ^0.17.2 normal
      • git-features ^0.26.5 normal
      • git-hash ^0.10.3 normal
      • git-validate ^0.7.3 normal
      • hex ^0.4.2 normal
      • itoa ^1.0.1 normal
      • nom ^7 normal
      • serde ^1.0.114 normal optional
      • smallvec ^1.4.0 normal
      • thiserror ^1.0.34 normal
      • pretty_assertions ^1.0.0 dev
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-pc-windows-msvc
    • i686-unknown-linux-gnu
    • x86_64-apple-darwin
    • x86_64-pc-windows-msvc
    • x86_64-unknown-linux-gnu
  • Feature flags
  • docs.rs
    • About docs.rs
    • Privacy policy
  • Rust
    • Rust website
    • The Book
    • Standard Library API Reference
    • Rust by Example
    • The Cargo Guide
    • Clippy Documentation

Crate git_object

git_object0.26.2

  • All Items

Sections

  • Feature Flags

Crate Items

  • Re-exports
  • Modules
  • Structs
  • Enums
  • Traits

Crates

  • git_object

Crate git_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

  • serde1 — 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§

pub use bstr;

Modules§

commit
data
Contains a borrowed Object bound to a buffer holding its decompressed data.
decode
encode
Encoding utilities
kind
tag
tree

Structs§

Blob
A mutable chunk of any data.
BlobRef
A chunk of any data.
Commit
A mutable git commit, representing an annotated state of a working tree along with a reference to its historical commits.
CommitRef
A git commit parsed using from_bytes().
CommitRefIter
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.
Data
A borrowed object using a slice as backing buffer, or in other words a bytes buffer that knows the kind of object it represents.
Tag
A mutable git tag.
TagRef
Represents a git tag, commonly indicating a software release.
TagRefIter
Like TagRef, but as Iterator to support entirely allocation free parsing. It’s particularly useful to dereference only the target chain.
Tree
A mutable Tree, containing other trees, blobs or commits.
TreeRef
A directory snapshot containing files (blobs), directories (trees) and submodules (commits).
TreeRefIter
A directory snapshot containing files (blobs), directories (trees) and submodules (commits), lazily evaluated.

Enums§

Kind
The four types of objects that git differentiates. #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
Object
Mutable objects with each field being separately allocated and changeable.
ObjectRef
Immutable objects are read-only structures referencing most data from a byte slice.

Traits§

WriteTo
Writing of objects to a Write implementation

Results

Settings
Help
    struct
    git_object::decode::Error
    A type to indicate errors during parsing and to abstract …
    enum
    git_object::data::verify::Error
    Returned by crate::Data::verify_checksum()
    enum
    git_object::encode::Error
    An error returned when object encoding fails.
    enum
    git_object::kind::Error
    The Error used in Kind::from_bytes().
    enum
    git_object::tag::write::Error
    An Error used in Tag::write_to().
    enum
    git_object::tree::write::Error
    The Error used in Tree::write_to().
    struct field
    git_object::decode::ParseError::errors
    List of errors accumulated by VerboseError, containing the …
    struct field
    git_object::decode::ParseErrorOwned::errors
    List of errors accumulated by VerboseError, containing the …
    type alias
    git_object::decode::ParseError
    The type to be used for parse errors.
    type alias
    git_object::decode::ParseErrorOwned
    The owned type to be used for parse errors.
    enum variant
    git_object::decode::LooseHeaderDecodeError::ParseIntegerError
    enum
    git_object::decode::LooseHeaderDecodeError
    Returned by loose_header()
    method
    git_object::decode::LooseHeaderDecodeError::from
    Error -> LooseHeaderDecodeError
    method
    git_object::tag::write::Error::from
    Error -> Error
    struct field
    git_object::decode::Error::inner
    Error -> ParseErrorOwned
    The actual error
    method
    git_object::decode::Error::clone
    &Error -> Error
    method
    git_object::kind::Error::clone
    &Error -> Error
    method
    git_object::tag::write::Error::source
    &Error -> Option<&Error>
    method
    git_object::data::verify::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::decode::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::encode::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::kind::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::tag::write::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::tree::write::Error::fmt
    &Error, &mut Formatter -> Result
    method
    git_object::decode::Error::from
    Err<ParseError> -> Error
    method
    git_object::CommitRefIter::author
    CommitRefIter -> Result<SignatureRef, Error>
    Returns the author signature if there is no decoding error.
    method
    git_object::CommitRefIter::committer
    CommitRefIter -> Result<SignatureRef, Error>
    Returns the committer signature if there is no decoding …
    method
    git_object::TagRefIter::target_id
    TagRefIter -> Result<ObjectId, Error>
    Returns the target id of this tag if it is the first …
    method
    git_object::Data::decode
    &Data -> Result<ObjectRef, Error>
    Decodes the data in the backing slice into a ObjectRef, …
    method
    git_object::decode::LooseHeaderDecodeError::source
    &LooseHeaderDecodeError -> Option<&Error>
    method
    git_object::TagRefIter::tagger
    TagRefIter -> Result<Option<SignatureRef>, Error>
    Returns the taggers signature if there is no decoding …
    method
    git_object::TreeRefIter::entries
    TreeRefIter -> Result<Vec<EntryRef>, Error>
    Consume self and return all parsed entries.
    method
    git_object::CommitRefIter::message
    CommitRefIter -> Result<&BStr, Error>
    Returns the message if there is no decoding error.
    method
    git_object::CommitRefIter::tree_id
    &mut CommitRefIter -> Result<ObjectId, Error>
    Returns the object id of this commits tree if it is the …
    method
    git_object::Kind::from_bytes
    &[u8] -> Result<Kind, Error>
    Parse a Kind from its serialized loose git objects.
    method
    git_object::CommitRef::from_bytes
    &[u8] -> Result<CommitRef, Error>
    Deserialize a commit from the given data bytes while …
    method
    git_object::TagRef::from_bytes
    &[u8] -> Result<TagRef, Error>
    Deserialize a tag from data.
    method
    git_object::TreeRef::from_bytes
    &[u8] -> Result<TreeRef, Error>
    Deserialize a Tree from data.
    method
    git_object::ObjectRef::from_bytes
    Kind, &[u8] -> Result<ObjectRef, Error>
    Deserialize an object of kind from the given data.
    method
    git_object::Data::verify_checksum
    &Data, AsRef<oid> -> Result<(), Error>
    Compute the checksum of self and compare it with the …
    method
    git_object::tag::write::Error::from
    Error -> Error
    method
    git_object::decode::Error::clone
    &Error -> Error
    method
    git_object::kind::Error::clone
    &Error -> Error
    method
    git_object::tag::write::Error::source
    &Error -> Option<&Error>