Struct git_pack::cache::object::MemoryCappedHashmap[][src]

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

An LRU cache with hash map backing and an eviction rule based on the memory usage for object data in bytes.

Implementations

The amount of bytes we can hold in total, or the value we saw in new(…).

Return a new instance which evicts least recently used items if it uses more than memory_cap_in_bytes object data.

Trait Implementations

Put the object going by id of kind with data into the cache.

Try to retrieve the object named id and place its data into out if available and return Some(kind) if found.

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.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. 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.