Struct kernel::list::ListArcField
source · pub struct ListArcField<T, const ID: u64 = 0> { /* private fields */ }
Expand description
A field owned by a specific ListArc
.
Implementations§
source§impl<T, const ID: u64> ListArcField<T, ID>
impl<T, const ID: u64> ListArcField<T, ID>
sourcepub fn get_mut(&mut self) -> &mut T
pub fn get_mut(&mut self) -> &mut T
Access the value when we have exclusive access to the ListArcField
.
This allows access to the field using an UniqueArc
instead of a ListArc
.
sourcepub unsafe fn assert_ref(&self) -> &T
pub unsafe fn assert_ref(&self) -> &T
Unsafely assert that you have shared access to the ListArc
for this field.
§Safety
The caller must have shared access to the ListArc<ID>
containing the struct with this
field for the duration of the returned reference.
sourcepub unsafe fn assert_mut(&self) -> &mut T
pub unsafe fn assert_mut(&self) -> &mut T
Unsafely assert that you have mutable access to the ListArc
for this field.
§Safety
The caller must have mutable access to the ListArc<ID>
containing the struct with this
field for the duration of the returned reference.
Trait Implementations§
impl<T: Send + Sync, const ID: u64> Send for ListArcField<T, ID>
impl<T: Send + Sync, const ID: u64> Sync for ListArcField<T, ID>
Auto Trait Implementations§
impl<T, const ID: u64 = 0> !Freeze for ListArcField<T, ID>
impl<T, const ID: u64 = 0> !RefUnwindSafe for ListArcField<T, ID>
impl<T, const ID: u64> Unpin for ListArcField<T, ID>where
T: Unpin,
impl<T, const ID: u64> UnwindSafe for ListArcField<T, ID>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