#[repr(C)]pub struct WorkStealQueue { /* private fields */ }
Implementations§
Source§impl WorkStealQueue
impl WorkStealQueue
pub fn push_back<T>(&mut self, element: T) -> Result<()>
pub fn push_back_raw(&mut self, ptr: *mut c_void) -> Result<()>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn capacity(&self) -> usize
pub fn spare(&self) -> usize
Sourcepub fn pop_front_raw(&mut self) -> Option<*mut c_void>
pub fn pop_front_raw(&mut self) -> Option<*mut c_void>
如果是闭包,还是要获取裸指针再手动转换,不然类型有问题
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WorkStealQueue
impl RefUnwindSafe for WorkStealQueue
impl !Send for WorkStealQueue
impl !Sync for WorkStealQueue
impl Unpin for WorkStealQueue
impl UnwindSafe for WorkStealQueue
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more