Skip to main content

Join

Struct Join 

Source
pub struct Join<'scope, O> { /* private fields */ }
Expand description

A single started worker borrowed from its enclosing native owner.

Implementations§

Source§

impl<O> Join<'_, O>

Source

pub fn scope<T: Task<Output = O>, R>( task: T, stack: NonZero<usize>, run: impl for<'scope> FnOnce(Join<'scope, O>) -> R, ) -> Result<R, Error>

Runs with one worker retained until native joining, even if Join is forgotten.

Source

pub fn finish(self) -> O

Auto Trait Implementations§

§

impl<'scope, O> !Send for Join<'scope, O>

§

impl<'scope, O> !Sync for Join<'scope, O>

§

impl<'scope, O> !UnwindSafe for Join<'scope, O>

§

impl<'scope, O> Forget for Join<'scope, O>

§

impl<'scope, O> Freeze for Join<'scope, O>
where &'scope mut Option<(Handle, NonNull<O>)>: Freeze,

§

impl<'scope, O> Move for Join<'scope, O>

§

impl<'scope, O> RefUnwindSafe for Join<'scope, O>
where O: RefUnwindSafe,

§

impl<'scope, O> Unpin for Join<'scope, O>
where &'scope mut Option<(Handle, NonNull<O>)>: Unpin,

§

impl<'scope, O> UnsafeUnpin for Join<'scope, O>
where &'scope mut Option<(Handle, NonNull<O>)>: 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.