diff --git a/crates/thread_aware/src/lib.rs b/crates/thread_aware/src/lib.rs index 88468ba2..dec8a374 100644 --- a/crates/thread_aware/src/lib.rs +++ b/crates/thread_aware/src/lib.rs @@ -152,6 +152,7 @@ pub mod closure; pub mod registry; pub mod affinity; +pub mod traits; #[doc(inline)] pub use core::ThreadAware; diff --git a/crates/thread_aware/src/traits.rs b/crates/thread_aware/src/traits.rs new file mode 100644 index 00000000..3369b5bc --- /dev/null +++ b/crates/thread_aware/src/traits.rs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +//! Traits for thread-aware types. +//! +//! This module provides a separate reexport of the [`ThreadAware`] trait, which is also +//! available at the crate root. The purpose of this module is to allow downstream crates +//! to selectively reexport just the trait without also bringing in the [`ThreadAware`] +//! derive macro (which is conditionally exported at the crate root when the `derive` +//! feature is enabled). + +#[doc(inline)] +pub use crate::core::ThreadAware;