-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
43 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,15 @@ | ||
//! Unstable allocated backend trait and the built-in implementations. | ||
//! Sealed backend trait and the built-in implementations. | ||
|
||
// #[cfg(not(feature = "unstable"))] | ||
pub mod rc; | ||
|
||
/// Use a local reference counted backend. | ||
pub use rc::Local; | ||
/// Shared (thread-safe) reference counted backend. | ||
#[cfg(target_has_atomic = "ptr")] | ||
pub use rc::ThreadSafe; | ||
|
||
/// Sealed marker trait for allocated backend. | ||
// #[cfg(not(feature = "unstable"))] | ||
pub trait Backend: rc::Count + 'static {} | ||
|
||
// #[cfg(not(feature = "unstable"))] | ||
impl Backend for Local {} | ||
|
||
// #[cfg(not(feature = "unstable"))] | ||
#[cfg(target_has_atomic = "ptr")] | ||
impl Backend for ThreadSafe {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters