Struct Block
pub(in ::sync::mpmc::list) struct Block<T> { pub(in ::sync::mpmc::list) next: Atomic<*mut Block<T>>, pub(in ::sync::mpmc::list) slots: [Slot<T>; 31] }
A block in a linked list.
Each block in the list can hold up to BLOCK_CAP messages.
Fields
next: Atomic<*mut Block<T>>The next block in the linked list.
slots: [Slot<T>; 31]Slots for messages.
Implementations
impl<T> Block<T>
fn new() -> Box<Block<T>>Creates an empty block.
fn wait_next(&self) -> *mut Block<T>Waits until the next pointer is set.
unsafe fn destroy(this: *mut Block<T>, start: usize)Sets the
DESTROYbit in slots starting fromstartand destroys the block.
Auto Trait Implementations
impl<T> !Freeze for Block<T>
impl<T> !RefUnwindSafe for Block<T>
impl<T> !Sync for Block<T>
impl<T> !UnwindSafe for Block<T>
impl<T> Send for Block<T>
where
Atomic<*mut Block<T>>: Send,
[Slot<T>; 31]: Send,
impl<T> Unpin for Block<T>
where
Atomic<*mut Block<T>>: Unpin,
[Slot<T>; 31]: Unpin,
impl<T> UnsafeUnpin for Block<T>
where
Atomic<*mut Block<T>>: UnsafeUnpin,
[Slot<T>; 31]: UnsafeUnpin,
Blanket Implementations
impl<T> Any for Block<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Block<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Block<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for Block<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for Block<T>
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for Block<T>
impl<T, U> Into<U> for Block<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Block<T>
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Block<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>