1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
//! # Rw Cell
//!
//! rw_cell provides the ability to securely write data from one location of application
//! and read it from another even if Writer and Reader located in different
//! threads without copying/cloning and blocking access to data.
//!
/// M - multiple
/// W - writer
/// S - Single
/// R - Reader
pub mod mwsr;
#[inline]
pub(crate) fn none_raw_ptr<T>() -> *mut Option<T> {
Box::into_raw(Box::new(None))
}
#[inline]
pub(crate) fn some_raw_ptr<T>(val: T) -> *mut Option<T> {
Box::into_raw(Box::new(Some(val)))
}