pub struct SyncRefCell<T> {
pub ref_cell: RefCell<T>,
}Expand description
一个线程安全的 RefCell 包装器。
“I Promise I’m Safe RefCell :)”
Fields§
§ref_cell: RefCell<T>Implementations§
Source§impl SyncRefCell<ProcessControlBlock>
impl SyncRefCell<ProcessControlBlock>
Sourcepub fn fork(
self: &Arc<SyncRefCell<ProcessControlBlock>>,
) -> Arc<SyncRefCell<ProcessControlBlock>>
pub fn fork( self: &Arc<SyncRefCell<ProcessControlBlock>>, ) -> Arc<SyncRefCell<ProcessControlBlock>>
Sourcepub fn exec(
self: &Arc<SyncRefCell<ProcessControlBlock>>,
app_data: &[u8],
args: Vec<String>,
)
pub fn exec( self: &Arc<SyncRefCell<ProcessControlBlock>>, app_data: &[u8], args: Vec<String>, )
Source§impl<T> SyncRefCell<T>
impl<T> SyncRefCell<T>
Sourcepub fn inner_borrow_mut(&self) -> RefMut<'_, T>
pub fn inner_borrow_mut(&self) -> RefMut<'_, T>
Sourcepub fn inner_borrow(&self) -> Ref<'_, T>
pub fn inner_borrow(&self) -> Ref<'_, T>
Trait Implementations§
impl<T> Sync for SyncRefCell<T>
Auto Trait Implementations§
impl<T> !Freeze for SyncRefCell<T>
impl<T> !RefUnwindSafe for SyncRefCell<T>
impl<T> Send for SyncRefCell<T>where
T: Send,
impl<T> Unpin for SyncRefCell<T>where
T: Unpin,
impl<T> UnwindSafe for SyncRefCell<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