foyer_common/lib.rs
1// Copyright 2025 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 util that convert the blocking call to async call.
20pub mod asyncify;
21/// The bitwise utils.
22pub mod bits;
23/// The [`bytes::Buf`] and [`bytes::BufMut`] extensions.
24pub mod buf;
25/// The trait for the key and value encoding and decoding.
26pub mod code;
27/// Components for monitoring internal events.
28pub mod event;
29/// Future extensions.
30pub mod future;
31/// Provisioned hashers.
32pub mod hasher;
33/// The shared metrics for foyer.
34pub mod metrics;
35/// Entry-level properties.
36pub mod properties;
37/// A rate limiter that returns the wait duration for limitation.
38pub mod rate;
39/// A ticket-based rate limiter.
40pub mod rated_ticket;
41/// A runtime that automatically shutdown itself on drop.
42pub mod runtime;
43/// Tracing related components.
44#[cfg(feature = "tracing")]
45pub mod tracing;
46/// Useful helpers.
47pub mod utils;