#[repr(C)]pub struct Entry<T: StringFormat> { /* private fields */ }
Implementations§
Source§impl<T: StringFormat> Entry<T>
impl<T: StringFormat> Entry<T>
Sourcepub const WIDE: u16 = 32_768u16
pub const WIDE: u16 = 32_768u16
Constant to represent a “wide” entry. This is used for determining if the entry is wide.
Sourcepub const REF_COUNT_MASK: u16 = 32_767u16
pub const REF_COUNT_MASK: u16 = 32_767u16
Mask used for reference count in flags.
Sourcepub const LENGTH_MASK: u32 = 16_777_215u32
pub const LENGTH_MASK: u32 = 16_777_215u32
Mask used to extract the length value from the length_or_right
union.
Sourcepub fn acquire(&self)
pub fn acquire(&self)
Acquire the entry by incrementing its reference count.
This method ensures atomicity by loading the current value of the reference count, and then attempts to increment the reference count. The operation is performed in a loop to ensure that the reference count does not overflow.
Sourcepub const fn len(&self) -> u32
pub const fn len(&self) -> u32
Returns the length of the entry, extracting it from the length_or_right
union.
This corresponds to the length
or size
function in the C++ API.
§Returns
Returns the length stored in the length_or_right
union after applying the LENGTH_MASK
.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Entry<T>
impl<T> RefUnwindSafe for Entry<T>
impl<T> !Send for Entry<T>
impl<T> !Sync for Entry<T>
impl<T> Unpin for Entry<T>
impl<T> UnwindSafe for Entry<T>
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