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::Blob
    A mutable chunk of any data.
    enum variant
    git_object::tree::EntryMode::Blob
    A file that is not executable
    enum variant
    git_object::Kind::Blob
    enum variant
    git_object::ObjectRef::Blob
    enum variant
    git_object::Object::Blob
    struct
    git_object::BlobRef
    A chunk of any data.
    enum variant
    git_object::tree::EntryMode::BlobExecutable
    A file that is executable
    method
    git_object::ObjectRef::as_blob
    Interpret this object as blob.
    method
    git_object::Object::as_blob
    Returns a Blob if it is one.
    method
    git_object::tree::EntryMode::is_blob
    Return true if the entry is any kind of blob.
    method
    git_object::ObjectRef::into_blob
    Interpret this object as blob, chainable.
    method
    git_object::Object::into_blob
    Turns this instance into a Blob, panic otherwise.
    method
    git_object::Object::try_into_blob
    Turns this instance into a Blob if it is one.
    method
    git_object::Object::try_into_blob_ref
    Turns this instance into a BlobRef if it is a blob.
    struct field
    git_object::Blob::data
    Blob -> Vec
    The data itself.
    method
    git_object::Object::from
    Blob -> Object
    method
    git_object::Blob::kind
    &Blob -> Kind
    method
    git_object::Blob::size
    &Blob -> usize
    method
    git_object::Blob::clone
    &Blob -> Blob
    method
    git_object::Blob::to_ref
    &Blob -> BlobRef
    Provide a BlobRef to this owned blob
    method
    git_object::Blob::eq
    &Blob, &Blob -> bool
    method
    git_object::Blob::cmp
    &Blob, &Blob -> Ordering
    method
    git_object::Blob::serialize
    &Blob, __S -> Result
    method
    git_object::Blob::fmt
    &Blob, &mut Formatter -> Result
    method
    git_object::Blob::write_to
    &Blob, Write -> Result<()>
    Write the blobs data to out verbatim.
    method
    git_object::Blob::partial_cmp
    &Blob, &Blob -> Option<Ordering>
    method
    git_object::Blob::hash
    &Blob, &mut __H -> ()
    method
    git_object::Blob::from
    BlobRef -> Blob
    method
    git_object::Object::into_blob
    Object -> Blob
    Turns this instance into a Blob, panic otherwise.
    method
    git_object::Blob::try_from
    Object -> Result<Blob, TryFrom::Error>
    method
    git_object::Blob::deserialize
    __D -> Result<Blob>
    method
    git_object::Object::try_into_blob
    Object -> Result<Blob, Object>
    Turns this instance into a Blob if it is one.
    method
    git_object::Object::as_blob
    &Object -> Option<&Blob>
    Returns a Blob if it is one.
    method
    git_object::Blob::clone
    &Blob -> Blob