stable_map/send_sync.rs
1use crate::StableMap;
2
3// SAFETY:
4// - This impl is required because Pos<InUse>, Pos<Stored> allow for conflicting access
5// but this API prevents this.
6unsafe impl<K, V, S> Send for StableMap<K, V, S>
7where
8 K: Send,
9 V: Send,
10 S: Send,
11{
12}
13
14// SAFETY:
15// - This impl is required because Pos<InUse>, Pos<Stored> allow for conflicting access
16// but this API prevents this.
17unsafe impl<K, V, S> Sync for StableMap<K, V, S>
18where
19 K: Sync,
20 V: Sync,
21 S: Sync,
22{
23}