Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/thread_aware/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ pub mod closure;
pub mod registry;

pub mod affinity;
pub mod traits;

#[doc(inline)]
pub use core::ThreadAware;
Expand Down
13 changes: 13 additions & 0 deletions crates/thread_aware/src/traits.rs
Original file line number Diff line number Diff line change
@@ -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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not expose the trait directly from the core module?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name traits was suggested for the module name, I can for sure just expose it from core.

Loading