#[repr(C)]pub struct RwLockState {
pub reader_count: u32,
pub writer_intent: u32,
pub writer_active: u32,
pub _padding: u32,
}Expand description
Shared-Exclusive lock state stored in lock file header
Format (16 bytes):
┌────────────┬────────────────┬──────────────────┬─────────┐
│ reader_cnt │ writer_intent │ writer_active │ padding │
│ (4 bytes) │ (4 bytes) │ (4 bytes) │ (4 B) │
└────────────┴────────────────┴──────────────────┴─────────┘Fields§
§reader_count: u32Number of active readers
writer_intent: u32Writer waiting to acquire (prevents reader starvation)
writer_active: u32Writer currently active
_padding: u32Reserved for future use
Trait Implementations§
Source§impl Clone for RwLockState
impl Clone for RwLockState
Source§fn clone(&self) -> RwLockState
fn clone(&self) -> RwLockState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RwLockState
Source§impl Debug for RwLockState
impl Debug for RwLockState
Source§impl Default for RwLockState
impl Default for RwLockState
Source§fn default() -> RwLockState
fn default() -> RwLockState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RwLockState
impl RefUnwindSafe for RwLockState
impl Send for RwLockState
impl Sync for RwLockState
impl Unpin for RwLockState
impl UnsafeUnpin for RwLockState
impl UnwindSafe for RwLockState
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more