crb_core/types/
mod.rs

1//! Generic traits to easily represent different requirements
2//! for types of messages.
3
4pub mod slot;
5pub mod unique;
6
7pub use slot::*;
8pub use unique::*;
9
10/// A tag that can be sent between threads.
11pub trait Tag: Send + 'static {}
12
13impl<T: Send + 'static> Tag for T {}
14
15/// A tag that can be sent between threads.
16pub trait SyncTag: Sync + Send + 'static {}
17
18impl<T: Sync + Send + 'static> SyncTag for T {}
19
20/// A message that can be sent between threads.
21pub trait Msg: Send + 'static {}
22
23impl<T: Send + 'static> Msg for T {}