Skip to main contentCrate fbl
Source pub use pin_init;
- canary
- impl_instanced_slab_allocatable
- Macro to implement
InstancedSlabAllocated and Recyclable for a struct. - impl_static_slab_allocatable
- Macro to implement
StaticSlabAllocated and Recyclable for a struct. - make_ref_counted
- Macro to construct a RefPtr, automatically populating the ref_count field.
- pin_make_ref_counted
- Macro to construct a RefPtr with pin-initialization, automatically populating the ref_count field.
- try_pin_make_ref_counted
- Macro to construct a RefPtr with fallible pin-initialization, automatically populating the ref_count field.
- try_vec
- Macro to construct a fallible
Vector.
- Array
- A fixed-size array that takes ownership of its elements.
This is a Rust analog to
fbl::Array in C++. - Canary
- An embeddable structure guard.
- Cursor
- A read-only cursor positioned in a
WavlTree. - CursorMut
- A cursor over elements in a
WavlTree. - DefaultObjectTag
- The default tag used when an object participates in only one list.
- DoublyLinkedList
- An intrusive doubly linked list container supporting custom ownership semantics, constant-time
operations, and circular-like node layout.
- DoublyLinkedListNode
- A node in a doubly linked list.
- ForwardIterator
- A unidirectional forward iterator over the elements of a
DoublyLinkedList. - InlineArray
- Runtime-determined, fixed size arrays that are “inlined” (e.g., on the stack) if the size at
most
N or heap-allocated otherwise. - Iterator
- An iterator over the elements of a
DoublyLinkedList. - NonTrackingSize
- A size tracker that does not actually track the size (zero overhead).
- OpaqueRefCounted
- A wrapper for C++ objects that are known to use
fbl::RefCounted
and have their reference count at offset 0. - PackedPointer
- A pointer wrapper that allows storing a small amount of data in the alignment bits of the
pointer.
- RefCounted
- Support for intrusive atomic reference counting.
- RefPtr
RefPtr<T> holds a reference to an intrusively-refcounted object of type
T that deletes the object when the refcount drops to 0.- ReverseIterator
- A unidirectional reverse iterator over the elements of a
DoublyLinkedList. - RingBuffer
RingBuffer is a statically-allocated, typed ring buffer container.
This container is not thread safe.- SinglyLinkedList
- A singly linked list that supports intrusive nodes and different ownership semantics.
- SinglyLinkedListNode
- A node in a singly linked list.
- SlabAllocator
- A slab-style allocator for a given object type
T. - SlabOrigin
- A helper type to store the originating slab allocator for instanced allocations.
- StringBuffer
- A fixed-size buffer for assembling a string.
- TrackingSize
- A size tracker that maintains the count of elements in the list.
- UniquePtr
UniquePtr<T> holds a unique pointer to an object of type T and deletes the
object when the UniquePtr goes out of scope.- Vector
Vector is a heap-allocated dynamic array, providing a subset of the
functionality of std::vec::Vec.- WavlTree
- WavlTreeNode
- A node in a Weak AVL (WAVL) Tree.
- CONTAINER_SENTINEL_BIT
- DEFAULT_SLAB_ALLOCATOR_SLAB_SIZE
- The default slab size in bytes (16KB).
- DoublyLinkedListContainable
- Trait that types must implement to be contained in a
DoublyLinkedList. - HasRefCount
- Trait to be implemented by types that contain a
RefCounted field. - InstancedSlabAllocated
- Trait implemented by types that can be allocated from an instanced slab allocator.
- ManagedPtr
- Marker trait for managed pointer types (like
UniquePtr and RefPtr). - PtrTraits
- Trait for pointer types that can be stored in intrusive containers.
- RawLock
- Trait defining a raw, un-instrumented synchronization lock abstraction.
- Recyclable
- Trait for types that can be recycled (deallocated).
- SinglyLinkedListContainable
- Trait that types must implement to be contained in a
SinglyLinkedList. - SizeTracker
- Trait for tracking the size of the list.
- StaticSlabAllocated
- Trait implemented by types that can be allocated from a static slab allocator.
- UninitRecyclable
- Trait for types that can be allocated in an uninitialized state.
- WavlTreeContainable
- Trait that types must implement to be contained in a
WavlTree. - WavlTreeKeyable
- Trait that types must implement to expose a key for
WavlTree sorting and lookup.
- conditional_select_nospec_eq
- returns
a if x == y, b otherwise.
Immune to speculative execution information leak bugs such as Spectre V1. - conditional_select_nospec_lt
- returns
a if x < y, b otherwise.
Immune to speculative execution information leak bugs such as Spectre V1. - confine_array_index
- returns
index if index < size, or 0 if index >= size.
Immune to speculative execution information leak bugs such as Spectre V1. - is_sentinel_ptr
- Test to see if a pointer is a sentinel pointer.
- magic
- Function for generating canary magic values from strings
- make_sentinel
- Create a sentinel pointer from a raw pointer.
- make_sentinel_null
- Create a sentinel pointer from null.
- remove_from_container⚠
- Removes an object from its container without a reference to the container.
- unmake_sentinel
- Turn a sentinel pointer back into a normal pointer.
- valid_sentinel_ptr
- Test to see if a pointer (which may be a sentinel) is valid.
Valid means it is not null and not a sentinel.
- ref_counted
- Attribute macro to make a struct reference counted.
- DoublyLinkedListContainable
- Derive macro to implement
DoublyLinkedListContainable for a struct. - Recyclable
- Derive macro to implement
Recyclable for a struct using kalloc::Box. - SinglyLinkedListContainable
- Derive macro to implement
SinglyLinkedListContainable for a struct. - WavlTreeContainable
- Derive macro to implement
WavlTreeContainable for a struct.