Struct git_ref::packed::Buffer[][src]

pub struct Buffer { /* fields omitted */ }
Expand description

A buffer containing a packed-ref file that is either memory mapped or fully in-memory depending on a cutoff.

The buffer is guaranteed to be sorted as per the packed-ref rules which allows some operations to be more efficient.

Implementations

packed-refs specific functionality

Return an iterator of references stored in this packed refs buffer, ordered by reference name.

Return an iterator yielding only references matching the given prefix, ordered by reference name.

Initialization

Open the file at path and map it into memory if the file size is larger than use_memory_map_if_larger_than_bytes.

In order to allow fast lookups and optimizations, the contents of the packed refs must be sorted. If that’s not the case, they will be sorted on the fly with the data being written into a memory buffer.

packed-refs specific functionality

Find a reference with the given name and return it.

Find a reference with the given name and return it.

Trait Implementations

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Encode the hex strict representing self into the result. Lower case letters are used (e.g. f9b4ca) Read more

Encode the hex strict representing self into the result. Upper case letters are used (e.g. F9B4CA) Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.