pub struct Cortex<T, L> { /* private fields */ }Implementations§
source§impl<T, L: CortexSync> Cortex<T, L>
impl<T, L: CortexSync> Cortex<T, L>
sourcepub fn new(
init_key: Option<i32>,
data: T,
force_ownership: bool,
lock_settings: Option<&L::Settings>
) -> CortexResult<Self>
pub fn new( init_key: Option<i32>, data: T, force_ownership: bool, lock_settings: Option<&L::Settings> ) -> CortexResult<Self>
Allocate a new segment of shared memory
sourcepub fn attach(key: i32) -> CortexResult<Self>
pub fn attach(key: i32) -> CortexResult<Self>
Attempt to attach to an already existing segment of shared memory
sourcepub fn read(&self) -> CortexResult<T>
pub fn read(&self) -> CortexResult<T>
Read from shared memory
sourcepub fn write(&self, data: T) -> CortexResult<()>
pub fn write(&self, data: T) -> CortexResult<()>
Write to shared memory
pub fn key(&self) -> i32
Trait Implementations§
impl<T, L> Send for Cortex<T, L>
impl<T, L> Sync for Cortex<T, L>
Auto Trait Implementations§
impl<T, L> Freeze for Cortex<T, L>where
L: Freeze,
impl<T, L> RefUnwindSafe for Cortex<T, L>where
L: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, L> Unpin for Cortex<T, L>where
L: Unpin,
impl<T, L> UnwindSafe for Cortex<T, L>where
L: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more