Skip to main content

fbl/
lib.rs

1// Copyright 2026 The Fuchsia Authors
2//
3// Use of this source code is governed by a MIT-style
4// license that can be found in the LICENSE file or at
5// https://opensource.org/licenses/MIT
6
7#![no_std]
8
9extern crate self as fbl;
10
11mod array;
12mod bits;
13mod canary;
14mod conditional_select_nospec;
15mod confine_array_index;
16mod doubly_linked_list;
17mod inline_array;
18#[cfg(feature = "kernel")]
19mod name;
20mod opaque_ref_counted;
21mod packed_pointer;
22mod ptr_traits;
23mod recyclable;
24mod ref_counted;
25mod ref_ptr;
26mod ring_buffer;
27mod sentinel;
28mod singly_linked_list;
29mod size_tracker;
30mod slab_allocator;
31mod string_buffer;
32mod tag;
33mod unique_ptr;
34mod vector;
35mod wavl_tree;
36
37#[cfg(test)]
38mod intrusive_container_test_support;
39
40pub use array::Array;
41pub use bits::{BitsSource, BitsTarget, extract_bit, extract_bits};
42pub use canary::{Canary, magic};
43pub use conditional_select_nospec::{conditional_select_nospec_eq, conditional_select_nospec_lt};
44pub use confine_array_index::confine_array_index;
45pub use doubly_linked_list::{
46    DoublyLinkedList, DoublyLinkedListContainable, DoublyLinkedListNode, ForwardIterator, Iterator,
47    ReverseIterator, remove_from_container,
48};
49pub use fbl_macros::{
50    DoublyLinkedListContainable, Recyclable, SinglyLinkedListContainable, WavlTreeContainable,
51    ref_counted,
52};
53pub use inline_array::InlineArray;
54#[cfg(feature = "kernel")]
55pub use name::Name;
56pub use opaque_ref_counted::{IsOpaqueRefCounted, OpaqueRefCounted, OpaqueRefCountedFacade};
57pub use packed_pointer::PackedPointer;
58pub use pin_init;
59pub use ptr_traits::{ManagedPtr, PtrTraits};
60pub use recyclable::{Recyclable, UninitRecyclable};
61pub use ref_counted::{HasRefCount, RefCounted};
62pub use ref_ptr::RefPtr;
63pub use ring_buffer::RingBuffer;
64pub use sentinel::*;
65pub use singly_linked_list::{SinglyLinkedList, SinglyLinkedListContainable, SinglyLinkedListNode};
66pub use size_tracker::{NonTrackingSize, SizeTracker, TrackingSize};
67pub use slab_allocator::{
68    DEFAULT_SLAB_ALLOCATOR_SLAB_SIZE, InstancedSlabAllocated, IsRawMutex, RawLock, SlabAllocator,
69    SlabOrigin, StaticSlabAllocated,
70};
71pub use string_buffer::StringBuffer;
72pub use tag::DefaultObjectTag;
73pub use unique_ptr::UniquePtr;
74pub use vector::Vector;
75pub use wavl_tree::{
76    Cursor, CursorMut, WavlTree, WavlTreeAugmentedInvariantObserver,
77    WavlTreeAugmentedInvariantObserverTraits, WavlTreeContainable, WavlTreeKeyable, WavlTreeNode,
78    WavlTreeObserver,
79};
80
81#[doc(hidden)]
82pub use zr::static_assert as __static_assert;