Skip to main content

Group

Struct Group 

Source
pub struct Group<'d, F, const N: usize> { /* private fields */ }
Expand description

Inline streaming group for 1 through 16 homogeneous fibers. Slots, bindings, readiness, and membership stay resident; wakes produced while polling enter the next stable batch.

Implementations§

Source§

impl<'d, F, const N: usize> Group<'d, F, N>

Source

pub fn try_new<'a>( target: Vacant<'a, Self>, parent: RootWaker<'d>, ) -> Result<Occupied<'a, Self>, Error>

Reserves the exact driver task domain without allocating group storage.

Source

pub fn try_with<'a>( target: Vacant<'a, Self>, parent: RootWaker<'d>, fibers: [F; N], ) -> Result<Occupied<'a, Self>, Error>

Reserves the task domain and schedules every input in array order.

Source

pub fn len(&self) -> Len<N>

Source

pub fn is_ready(&self) -> bool

Whether an inserted or woken member is ready for a stable batch.

Source

pub fn vacant(self: Pin<&mut Self>) -> Option<Vacant<'_, 'd, F, N>>

Borrows the group exclusively only when one inline slot is available.

Source§

impl<'d, F, const N: usize> Group<'d, F, N>
where F: Fiber<'d>,

Source

pub fn drive_ready<'group, 'out, 'call, 'turn>( self: Pin<&'group mut Self>, context: &'call mut Context<'turn, 'd>, output: Vacant<'out, Drive<N>>, ) -> Drain<'group, 'out, 'call, 'turn, 'd, F, N> ⓘ
where 'd: 'turn,

Source

pub fn drive_admit<'group, 'out, 'call, 'turn>( self: Pin<&'group mut Self>, admit: Admission<'call, 'turn, 'd>, output: Vacant<'out, Drive<N>>, ) -> Drain<'group, 'out, 'call, 'turn, 'd, F, N> ⓘ
where 'd: 'turn,

Trait Implementations§

Source§

impl<'d, F, const N: usize> Drop for Group<'d, F, N>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl<'pin, 'd, F, const N: usize> Unpin for Group<'d, F, N>
where PinnedFieldsOf<__Group<'pin, 'd, F, N>>: Unpin,

Auto Trait Implementations§

§

impl<'d, F, const N: usize> !Freeze for Group<'d, F, N>

§

impl<'d, F, const N: usize> !RefUnwindSafe for Group<'d, F, N>

§

impl<'d, F, const N: usize> !Send for Group<'d, F, N>

§

impl<'d, F, const N: usize> !Sync for Group<'d, F, N>

§

impl<'d, F, const N: usize> !UnwindSafe for Group<'d, F, N>

§

impl<'d, F, const N: usize> Forget for Group<'d, F, N>

§

impl<'d, F, const N: usize> Move for Group<'d, F, N>

§

impl<'d, F, const N: usize> UnsafeUnpin for Group<'d, F, N>
where F: UnsafeUnpin, Root<'d, Shared<Context<Receive>>>: UnsafeUnpin, PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: UnsafeUnpin, NonZeroU32Inner: UnsafeUnpin, PhantomData<*mut ()>: UnsafeUnpin, Reference<'d>: UnsafeUnpin, PhantomData<Sealed>: UnsafeUnpin, PhantomData<fn(Index<N>) -> Index<N>>: UnsafeUnpin, PhantomData<fn() -> Index<N>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<L, R> Convert<Either<L, R>, 1> for L

Source§

fn into(self) -> Either<L, R>

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety Read more
Source§

impl<L, R> Convert<Either<L, R>, 2> for R

Source§

fn into(self) -> Either<L, R>

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety Read more
Source§

impl<T> Convert<T> for T

Source§

fn into(self) -> T

Source§

unsafe fn take_into(source: *mut Self, place: &mut MaybeUninit<T>)
where Self: Sized,

Safety Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.