pub struct RawMutex { /* private fields */ }Expand description
Opaque layout block matching the Zircon C++ Mutex exactly.
Implementations§
Source§impl RawMutex
impl RawMutex
pub const INIT: Self
Sourcepub const fn const_init(_class_id: *const c_void) -> Self
pub const fn const_init(_class_id: *const c_void) -> Self
Statically initializes a RawMutex in constant context.
Sourcepub fn raw_storage_slice(&self) -> &[u8]
pub fn raw_storage_slice(&self) -> &[u8]
Returns a slice over the raw mutex storage bytes.
Trait Implementations§
Source§impl PinnedDrop for RawMutex
impl PinnedDrop for RawMutex
Source§impl RawLock for RawMutex
impl RawLock for RawMutex
Source§type LockEntry = LockEntryStorage
type LockEntry = LockEntryStorage
Opaque stack entry storage type used by the lock validation loop detector (e.g. LockDep).
Source§type DefaultPolicy = RawMutexPolicy
type DefaultPolicy = RawMutexPolicy
Default policy that should be used when acquiring this lock.
Source§unsafe fn init(class_id: *const c_void) -> impl PinInit<Self, Infallible>
unsafe fn init(class_id: *const c_void) -> impl PinInit<Self, Infallible>
Returns a PinInit block to initialize the raw mutex in-place. Read more
Source§fn as_mut_ptr(&self) -> *mut c_void
fn as_mut_ptr(&self) -> *mut c_void
Convert the raw mutex reference to a standard c_void pointer for FFI.
Source§const LOCK_FLAGS: LockFlags = lockdep::LOCK_FLAGS_NONE
const LOCK_FLAGS: LockFlags = lockdep::LOCK_FLAGS_NONE
Flags specifying validation rules for the lock class.
impl Send for RawMutex
impl Sync for RawMutex
Auto Trait Implementations§
impl !Freeze for RawMutex
impl !RefUnwindSafe for RawMutex
impl UnsafeUnpin for RawMutex
impl UnwindSafe for RawMutex
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>
Initializes
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
First initializes the value using
self then calls the function f with the initialized
value. Read more