Docs.rs
  • git-features-0.26.5
    • git-features 0.26.5
    • Permalink
    • Docs.rs crate page
    • MIT/Apache-2.0
    • Links
    • Repository
    • crates.io
    • Source
    • Owners
    • Byron
    • Dependencies
      • bytes ^1.0.0 normal optional
      • crc32fast ^1.2.1 normal optional
      • crossbeam-channel ^0.5.0 normal optional
      • crossbeam-utils ^0.8.7 normal optional
      • document-features ^0.2.0 normal optional
      • flate2 ^1.0.17 normal optional
      • git-hash ^0.10.3 normal
      • jwalk ^0.8.1 normal optional
      • num_cpus ^1.13.0 normal optional
      • once_cell ^1.13.0 normal optional
      • parking_lot ^0.12.0 normal optional
      • prodash ^23.0 normal optional
      • quick-error ^2.0.0 normal optional
      • sha1 ^0.10.0 normal optional
      • sha1_smol ^1.0.0 normal optional
      • walkdir ^2.3.2 normal optional
      • bstr ^1.0.1 dev
      • sha1 ^0.10.0 normal optional
      • libc ^0.2.119 normal
    • Versions
    • 100% of the crate is documented
  • Platform
    • i686-unknown-linux-gnu
    • 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_features

git_features0.26.5

  • All Items

Sections

  • Feature Flags
    • Mutually Exclusive ZLIB
    • Mutually Exclusive SHA1
    • Other
    • Optional Dependencies

Crate Items

  • Modules

Crates

  • git_features

Crate git_features

Source
Expand description

A crate providing foundational capabilities to other git-* crates with trade-offs between compile time, binary size or speed selectable using cargo feature toggles.

It’s designed to allow the application level crate to configure feature toggles, affecting all other git-* crates using this one.

Thus all features provided here commonly have a ‘cheap’ base implementation, with the option to pull in counterparts with higher performance.

§Feature Flags

  • progress — Provide traits and utilities for providing progress information. These can then be rendered using facilities of the prodash crate.
  • fs-walkdir-parallel — If set, walkdir iterators will be multi-threaded.
  • parallel — Use scoped threads and channels to parallelize common workloads on multiple objects. If enabled, it is used everywhere where it makes sense. As caches are likely to be used and instantiated per thread, more memory will be used on top of the costs for threads. The threading module will contain thread-safe primitives for shared ownership and mutation, otherwise these will be their single threaded counterparts. This way, single-threaded applications don’t have to pay for threaded primitives.
  • crc32 — provide a proven and fast crc32 implementation.

§Mutually Exclusive ZLIB

  • zlib — Enable the usage of zlib related utilities to compress or decompress data. By default it uses a pure rust implementation which is slower than the zlib-ng-compat or zlib-stock versions, but might be relevant if you prefer a pure-rust build and reduced performance is acceptable. zlib-stock can be used if dynamic linking of an external zlib library is desired or if cmake is not available. Note that a competitive Zlib implementation is critical to gitoxide's object database performance. Additional backends are supported, each of which overriding the default Rust backend.
  • zlib-ng — Use zlib-ng (libz-ng-sys) with native API (no compat mode) that can co-exist with system libz.
  • zlib-ng-compat — Use a C-based backend which can compress and decompress significantly faster than the other options.
  • zlib-stock — Use a slower C-based backend which can compress and decompress significantly faster than the rust version. Unlike zlib-ng-compat, this allows using dynamic linking with system zlib libraries and doesn’t require cmake.
  • zlib-rust-backend — available for completeness even though it’s the default - it may be chosen for more specific feature flag names, instead of a bare zlib.

§Mutually Exclusive SHA1

  • fast-sha1 — A fast SHA1 implementation is critical to gitoxide's object database performance A multi-crate implementation that can use hardware acceleration, thus bearing the potential for up to 2Gb/s throughput on CPUs that support it, like AMD Ryzen or Intel Core i3, as well as Apple Silicon like M1. Takes precedence over rustsha1 if both are specified.
  • rustsha1 — A standard and well performing pure Rust implementation of Sha1. Will significantly slow down various git operations.

§Other

  • cache-efficiency-debug — Count cache hits and misses and print that debug information on drop. Caches implement this by default, which costs nothing unless this feature is enabled

§Optional Dependencies

  • walkdir — Makes facilities of the walkdir crate partially available. In conjunction with the parallel feature, directory walking will be parallel instead behind a compatible interface.
  • once_cell — If enabled, OnceCell will be made available for interior mutability either in sync or unsync forms.

Modules§

cache
decode
fs
Filesystem utilities
hash
Hash functions and hash utilities
interrupt
Utilities to cause interruptions in common traits, like Read/Write and Iterator.
ioio-pipe
A unidirectional pipe for bytes, analogous to a unix pipe. Available with the io-pipe feature toggle.
iter
parallel
Run computations in parallel, or not based the parallel feature toggle.
progressprogress
Various prodash types along with various utilities for comfort.
threading
Type definitions for putting shared ownership and synchronized mutation behind the threading feature toggle.
zlibzlib

Results

Settings
Help
    struct
    git_features::interrupt::Read
    A wrapper for implementors of std::io::Read or …
    struct
    git_features::progress::Read
    A structure passing every read call through to the …
    function
    git_features::zlib::stream::inflate::read
    Read bytes from rd and decompress them using state into a …
    method
    git_features::interrupt::Read::read
    method
    git_features::io::pipe::Reader::read
    method
    git_features::progress::Read::read
    method
    git_features::zlib::stream::inflate::ReadBoxed::read
    struct
    git_features::io::pipe::Reader
    The read-end of the pipe, implementing the std::io::Read …
    struct
    git_features::zlib::stream::inflate::ReadBoxed
    The boxed variant is faster for what we do (moving the …
    struct field
    git_features::fs::walkdir::DirEntryGeneric::read_children_path
    Path that will be used to read child entries. This is …
    struct field
    git_features::fs::walkdir::DirEntry::read_children_path
    Path that will be used to read child entries. This is …
    struct field
    git_features::fs::walkdir::DirEntryGeneric::read_children_error
    If read_children_path is set and resulting fs::read_dir …
    struct field
    git_features::fs::walkdir::DirEntry::read_children_error
    If read_children_path is set and resulting fs::read_dir …
    function
    git_features::parallel::threads
    Runs f with a scope to be used for spawning threads that …
    module
    git_features::threading
    Type definitions for putting shared ownership and …
    struct field
    git_features::fs::walkdir::Parallelism::ThreadPoolPerTraversal::thread_name
    The base name of the threads we create as part of the …
    enum variant
    git_features::fs::walkdir::Parallelism::ThreadPoolPerTraversal
    Create a new thread pool for each traversal with up to 16 …
    function
    git_features::parallel::num_threads
    Returns the amount of threads the system can effectively …
    function
    git_features::decode::leb64_from_read
    Decode variable int numbers from a Read implementation.
    function
    git_features::parallel::optimize_chunk_size_and_thread_limit
    Return the ‘optimal’ (size of chunks, …
    method
    git_features::interrupt::Read::read
    &mut Read<R>, &mut [u8] -> Result<usize>
    method
    git_features::progress::Read::read
    &mut Read<T, P>, &mut [u8] -> Result<usize>
    struct field
    git_features::interrupt::Read::inner
    Read ->
    The actual implementor of std::io::Read to which interrupt …
    struct field
    git_features::progress::Read::inner
    Read ->
    The implementor of std::io::Read to which progress is added
    struct field
    git_features::progress::Read::progress
    Read ->
    The progress instance receiving progress information on …
    struct field
    git_features::interrupt::Read::should_interrupt
    Read -> &
    The flag to trigger interruption
    method
    git_features::interrupt::Read::consume
    &mut Read<R>, usize -> ()
    function
    git_features::decode::leb64_from_read
    Read -> Result<(u64, usize), Error>
    Decode variable int numbers from a Read implementation.
    method
    git_features::progress::Read::consume
    &mut Read<T, P>, usize -> ()
    method
    git_features::interrupt::Read::fill_buf
    &mut Read<R> -> Result<&[u8]>
    method
    git_features::progress::Read::fill_buf
    &mut Read<T, P> -> Result<&[u8]>
    function
    git_features::hash::bytes
    Read, usize, Kind, &mut undefined, &AtomicBool -> Result<ObjectId>
    Similar to bytes_of_file, but operates on an already open …
No results :(
Try on DuckDuckGo?

Or try looking in one of these:
  • The Rust Reference for technical details about the language.
  • Rust By Example for expository code examples.
  • The Rust Book for introductions to language features and the language itself.
  • Docs.rs for documentation of crates released on crates.io.