pub(crate) struct Flag {
failed: Atomic<bool>,
}
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)Fields§
§failed: Atomic<bool>
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)Implementations§
Source§impl Flag
impl Flag
pub const fn new() -> Flag
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)Sourcepub fn borrow(&self) -> LockResult<()>
🔬This is a nightly-only experimental API. (sync_poison_mod
#134646)
pub fn borrow(&self) -> LockResult<()>
sync_poison_mod
#134646)Checks the flag for an unguarded borrow, where we only care about existing poison.
Sourcepub fn guard(&self) -> LockResult<Guard>
🔬This is a nightly-only experimental API. (sync_poison_mod
#134646)
pub fn guard(&self) -> LockResult<Guard>
sync_poison_mod
#134646)Checks the flag for a guarded borrow, where we may also set poison when done
.
pub fn done(&self, guard: &Guard)
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)pub fn get(&self) -> bool
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)pub fn clear(&self)
🔬This is a nightly-only experimental API. (
sync_poison_mod
#134646)Auto Trait Implementations§
impl !Freeze for Flag
impl RefUnwindSafe for Flag
impl Send for Flag
impl Sync for Flag
impl Unpin for Flag
impl UnwindSafe for Flag
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
Source§impl<T> SizedTypeProperties for T
impl<T> SizedTypeProperties for T
Source§#[doc(hidden)] const IS_ZST: bool = _
#[doc(hidden)] const IS_ZST: bool = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const LAYOUT: Layout = _
#[doc(hidden)] const LAYOUT: Layout = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)Source§#[doc(hidden)] const MAX_SLICE_LEN: usize = _
#[doc(hidden)] const MAX_SLICE_LEN: usize = _
🔬This is a nightly-only experimental API. (
sized_type_properties
)The largest safe length for a
[Self]
. Read more