pub struct CortexBuilder<T, S> { /* private fields */ }Implementations§
Source§impl<T> CortexBuilder<T, Uninitialized>
impl<T> CortexBuilder<T, Uninitialized>
pub fn new(data: T) -> CortexBuilder<T, Initialized>
Source§impl<T> CortexBuilder<T, Initialized>
impl<T> CortexBuilder<T, Initialized>
Sourcepub fn key(self, key: i32) -> CortexBuilder<T, WithKey>
pub fn key(self, key: i32) -> CortexBuilder<T, WithKey>
Set a custom key
Sourcepub fn random_key(self) -> CortexBuilder<T, WithRandomKey>
pub fn random_key(self) -> CortexBuilder<T, WithRandomKey>
Attempt to generate a random key
Source§impl<T> CortexBuilder<T, WithKey>
impl<T> CortexBuilder<T, WithKey>
Sourcepub fn force_ownership(self) -> CortexBuilder<T, WithKey>
pub fn force_ownership(self) -> CortexBuilder<T, WithKey>
Sets the force_ownership flag to true. If an already existing segment of shared memory
should exist on the selected key, with this flag, instead of throwing an error, attempts
to attach to that segment and set is_owner to true. Meaning this Cortex instance will
be responsible for any cleanup.
§Safety
Only use this option when you can guarantee that any pre-existing segment of shared memory on
the same key is also of the same type T.
Source§impl<T, S: KeyState> CortexBuilder<T, S>
impl<T, S: KeyState> CortexBuilder<T, S>
Sourcepub fn with_lock<L: CortexSync>(
self,
lock_settings: &L::Settings,
) -> CortexResult<Cortex<T, L>>
pub fn with_lock<L: CortexSync>( self, lock_settings: &L::Settings, ) -> CortexResult<Cortex<T, L>>
Attempt to construct a Cortex with custom lock settings that will differ depending on
your lock implementation
Sourcepub fn with_default_lock<L: CortexSync>(self) -> CortexResult<Cortex<T, L>>
pub fn with_default_lock<L: CortexSync>(self) -> CortexResult<Cortex<T, L>>
Attempt to construct a Cortex without passing any lock settings
Auto Trait Implementations§
impl<T, S> Freeze for CortexBuilder<T, S>where
T: Freeze,
impl<T, S> RefUnwindSafe for CortexBuilder<T, S>where
T: RefUnwindSafe,
S: RefUnwindSafe,
impl<T, S> Send for CortexBuilder<T, S>
impl<T, S> Sync for CortexBuilder<T, S>
impl<T, S> Unpin for CortexBuilder<T, S>
impl<T, S> UnwindSafe for CortexBuilder<T, S>where
T: UnwindSafe,
S: UnwindSafe,
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