pub trait Guard<V: Value> {
// Required methods
unsafe fn retire_node(&mut self, bits: usize, node: NonZeroU64);
unsafe fn retire_value(&mut self, value: u64);
}Expand description
Protects allocations from deallocation, and allows allocations to be retired.
External implementations may call deallocate_node and deallocate_value
to deallocate nodes and values
(passed via Guard::retire_node and Guard::retire_value) when they
can determine there are no live references.
Required Methods§
Sourceunsafe fn retire_node(&mut self, bits: usize, node: NonZeroU64)
unsafe fn retire_node(&mut self, bits: usize, node: NonZeroU64)
Retire an internal node with prefix length bits.
§Safety
Caller must guarantee node is a valid node pointer.
Sourceunsafe fn retire_value(&mut self, value: u64)
unsafe fn retire_value(&mut self, value: u64)
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".