koto_runtime/
send_sync.rs

1//! Definitions of Send and Sync used in the Koto runtime
2//!
3//! When Koto is being used in a single-threaded context [KotoSend] and [KotoSync] are empty
4//! traits implemented for all types.
5
6#[cfg(feature = "rc")]
7mod traits {
8    /// An empty trait for single-threaded contexts, implemented for all types
9    pub trait KotoSend {}
10    impl<T> KotoSend for T {}
11
12    /// An empty trait for single-threaded contexts, implemented for all types
13    pub trait KotoSync {}
14    impl<T> KotoSync for T {}
15}
16
17#[cfg(not(feature = "rc"))]
18mod traits {
19    pub use Send as KotoSend;
20    pub use Sync as KotoSync;
21}
22
23pub use traits::*;