hipstr/backend.rs
1//! Sealed backend trait and the built-in implementations.
2
3#[cfg(target_has_atomic = "ptr")]
4pub use crate::smart::Arc;
5pub use crate::smart::{Rc, Unique};
6
7#[deprecated(note = "renamed to Rc")]
8pub type Local = crate::smart::Rc;
9
10#[deprecated(note = "renamed to Arc")]
11pub type ThreadSafe = crate::smart::Arc;
12
13/// Sealed marker trait for allocated backend.
14pub trait Backend: crate::smart::Kind + 'static {}
15
16impl Backend for Rc {}
17
18#[cfg(target_has_atomic = "ptr")]
19impl Backend for Arc {}
20
21impl Backend for Unique {}