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/// A concurrent count down util.
28pub mod countdown;
29/// Components for monitoring internal events.
30pub mod event;
31/// Future extensions.
32pub mod future;
33/// Provisioned hashers.
34pub mod hasher;
35/// The shared metrics for foyer.
36pub mod metrics;
37/// Extensions for [`std::option::Option`].
38pub mod option;
39/// The range extensions.
40pub mod range;
41/// A rate limiter that returns the wait duration for limitation.
42pub mod rate;
43///  A ticket-based rate limiter.
44pub mod rated_ticket;
45/// A runtime that automatically shutdown itself on drop.
46pub mod runtime;
47/// A kotlin like functional programming helper.
48pub mod scope;
49/// Tracing related components.
50pub mod tracing;