pub struct UPIntrFreeCell<T> { /* private fields */ }Expand description
带中断屏蔽的内部可变性容器。
在访问内部数据时自动禁用中断,保证单处理器环境下的数据安全。
Implementations§
Source§impl<T> UPIntrFreeCell<T>
impl<T> UPIntrFreeCell<T>
Sourcepub fn exclusive_access(&self) -> UPIntrRefMut<'_, T>
pub fn exclusive_access(&self) -> UPIntrRefMut<'_, T>
Panic if the data has been borrowed.
Sourcepub fn exclusive_session<F, V>(&self, f: F) -> V
pub fn exclusive_session<F, V>(&self, f: F) -> V
exclusive_session
Trait Implementations§
impl<T> Sync for UPIntrFreeCell<T>
Auto Trait Implementations§
impl<T> !Freeze for UPIntrFreeCell<T>
impl<T> !RefUnwindSafe for UPIntrFreeCell<T>
impl<T> Send for UPIntrFreeCell<T>where
T: Send,
impl<T> Unpin for UPIntrFreeCell<T>where
T: Unpin,
impl<T> UnsafeUnpin for UPIntrFreeCell<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for UPIntrFreeCell<T>where
T: UnwindSafe,
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