pub struct RawRwLock { /* private fields */ }
Implementations§
Source§impl RawRwLock
impl RawRwLock
pub fn new() -> Self
pub fn is_valid_pointer(pointer: *const RawRwLock) -> bool
Sourcepub unsafe fn from_pointer<'a>(pointer: *const RawRwLock) -> Option<&'a Self>
pub unsafe fn from_pointer<'a>(pointer: *const RawRwLock) -> Option<&'a Self>
Transforms a pointer to a reference.
§Safety
This function is unsafe because it dereferences a raw pointer. The caller must ensure the pointer is valid and points to properly initialized memory.
Sourcepub unsafe fn from_mutable_pointer<'a>(
pointer: *mut RawRwLock,
) -> Option<&'a mut Self>
pub unsafe fn from_mutable_pointer<'a>( pointer: *mut RawRwLock, ) -> Option<&'a mut Self>
Transforms a mutable pointer to a mutable reference.
§Safety
This function is unsafe because it dereferences a raw pointer. The caller must ensure the pointer is valid and points to properly initialized memory.
pub fn read(&self) -> bool
pub fn write(&self) -> bool
pub fn unlock(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RawRwLock
impl !RefUnwindSafe for RawRwLock
impl Send for RawRwLock
impl Sync for RawRwLock
impl Unpin for RawRwLock
impl UnwindSafe for RawRwLock
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