pub struct Join<'pool, 'd, F, const N: usize>where
F: Fiber<'d>,{ /* private fields */ }Expand description
One ordered, fixed-capacity group of homogeneous fibers.
Implementations§
Source§impl<'pool, 'd, F, const N: usize> Join<'pool, 'd, F, N>where
F: Fiber<'d>,
impl<'pool, 'd, F, const N: usize> Join<'pool, 'd, F, N>where
F: Fiber<'d>,
Sourcepub fn from_array(pool: &'pool mut Pool<'d, N>, fibers: [F; N]) -> Self
pub fn from_array(pool: &'pool mut Pool<'d, N>, fibers: [F; N]) -> Self
Builds a batch containing every fiber in array order.
Sourcepub fn from_map<P>(
pool: &'pool mut Pool<'d, N>,
input: [P; N],
make: impl FnMut(P) -> F,
) -> Self
pub fn from_map<P>( pool: &'pool mut Pool<'d, N>, input: [P; N], make: impl FnMut(P) -> F, ) -> Self
Consumes each input in array order, constructing every fiber before returning.
Sourcepub fn from_fn(
pool: &'pool mut Pool<'d, N>,
make: impl FnMut(Index<N>) -> F,
) -> Self
pub fn from_fn( pool: &'pool mut Pool<'d, N>, make: impl FnMut(Index<N>) -> F, ) -> Self
Builds a full batch without materializing an intermediate fiber array.
pub fn try_push(&mut self, fiber: F) -> Result<(), F>
Trait Implementations§
impl<'pin, 'pool, 'd, F, const N: usize> Unpin for Join<'pool, 'd, F, N>
Auto Trait Implementations§
impl<'pool, 'd, F, const N: usize> !RefUnwindSafe for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> !Send for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> !Sync for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> !UnwindSafe for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> Forget for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> Freeze for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> Move for Join<'pool, 'd, F, N>
impl<'pool, 'd, F, const N: usize> UnsafeUnpin for Join<'pool, 'd, F, N>where
F: UnsafeUnpin,
<F as Fiber<'d>>::Output: UnsafeUnpin,
&'pool Scheduler<'d, N>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
PhantomData<*mut ()>: UnsafeUnpin,
PhantomData<(fn(&'d ()) -> &'d (), ThreadBound)>: UnsafeUnpin,
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