foyer_common/lib.rs
1// Copyright 2026 foyer Project Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Shared components and utils for foyer.
16
17/// Allow to enable debug assertions in release profile with feature "strict_assertion".
18pub mod assert;
19/// The bitwise utils.
20pub mod bits;
21/// The [`bytes::Buf`] and [`bytes::BufMut`] extensions.
22pub mod buf;
23/// The trait for the key and value encoding and decoding.
24pub mod code;
25/// Error types and result type.
26pub mod error;
27/// Components for monitoring internal events.
28pub mod event;
29/// Provisioned hashers.
30pub mod hasher;
31/// The shared metrics for foyer.
32pub mod metrics;
33/// Entry-level properties.
34pub mod properties;
35/// A rate limiter that returns the wait duration for limitation.
36pub mod rate;
37/// Utilities for spawning tasks.
38pub mod spawn;
39/// Tracing related components.
40#[cfg(feature = "tracing")]
41pub mod tracing;
42/// Useful helpers.
43pub mod utils;