Struct scc::LinkedEntry
source · pub struct LinkedEntry<T> { /* private fields */ }Expand description
Entry stores an instance of T and a link to the next entry.
Implementations§
source§impl<T> Entry<T>
impl<T> Entry<T>
sourcepub unsafe fn take_inner(&mut self) -> T
pub unsafe fn take_inner(&mut self) -> T
Extracts the inner instance of T.
§Safety
This method has to be called at most once per Entry, and the caller needs to make sure
that the Entry is not accessed via LinkedList methods.
§Examples
use scc::Stack;
let stack: Stack<usize> = Stack::default();
stack.push(37);
let mut entry = stack.pop().unwrap();
let pushed = unsafe { entry.get_mut().unwrap().take_inner() };
assert_eq!(pushed, 37);Trait Implementations§
source§impl<T> LinkedList for Entry<T>
impl<T> LinkedList for Entry<T>
source§fn link_ref(&self) -> &AtomicShared<Self>
fn link_ref(&self) -> &AtomicShared<Self>
Returns a reference to the forward link. Read more
source§fn is_deleted(&self, order: Ordering) -> bool
fn is_deleted(&self, order: Ordering) -> bool
source§fn push_back<'g>(
&self,
entry: Shared<Self>,
mark: bool,
order: Ordering,
guard: &'g Guard,
) -> Result<Ptr<'g, Self>, Shared<Self>>
fn push_back<'g>( &self, entry: Shared<Self>, mark: bool, order: Ordering, guard: &'g Guard, ) -> Result<Ptr<'g, Self>, Shared<Self>>
Appends the given entry to
self and returns a pointer to the entry. Read moreimpl<T: Eq> Eq for Entry<T>
Auto Trait Implementations§
impl<T> !Freeze for Entry<T>
impl<T> RefUnwindSafe for Entry<T>where
T: RefUnwindSafe,
impl<T> Send for Entry<T>where
T: Send,
impl<T> Sync for Entry<T>where
T: Sync,
impl<T> Unpin for Entry<T>where
T: Unpin,
impl<T> UnwindSafe for Entry<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)