Expand description
This crate provides types for identifying git objects using a hash digest.
These are provided in borrowed versions as well as an owned one.
§Feature Flags
sha1— Support for SHA1 hashes and digests.sha256— Support for SHA256 hashes and digests.serde— Data structures implementserde::Serializeandserde::Deserialize.
Modules§
Structs§
- Prefix
- A partial, owned hash possibly identifying an object uniquely, whose non-prefix bytes are zeroed.
- oid
- A borrowed reference to a hash identifying objects.
Enums§
- Error
- The error returned when trying to convert a byte slice to an
oidorObjectId - Hasher
- Hash implementations that can be used once.
- Kind
- Denotes the kind of function to produce a
ObjectId. - Object
Id - An owned hash identifying objects, most commonly
Sha1
Functions§
- bytes
- Similar to
bytes_of_file, but operates on a stream of bytes. - bytes_
of_ file - Compute the hash of
kindfor the bytes in the file atpath, hashing only the firstnum_bytes_from_startwhile initializing and callingprogress. - bytes_
with_ hasher - Similar to
bytes(), but takes ahasherinstead of a hash kind. - hasher
- Produce a hasher suitable for the given
kindof hash.