Struct thread_scoped::JoinGuard[][src]

#[must_use = "thread will be immediately joined if `JoinGuard` is not used"]pub struct JoinGuard<'a, T: Send + 'a> { /* fields omitted */ }

A RAII guard for that joins a scoped thread upon drop

Panics

JoinGuard will panic on join or drop if its owned thread panics

Implementations

impl<'a, T: Send + 'a> JoinGuard<'a, T>[src]

pub fn thread(&self) -> &Thread[src]

Provides the backing Thread object

pub fn join(self) -> T[src]

Joins the guarded thread and returns its result

Panics

join() will panic if the owned thread panics

Trait Implementations

impl<'a, T: Send + 'a> Drop for JoinGuard<'a, T>[src]

impl<T: Send + 'static> ScopedDetach for JoinGuard<'static, T>[src]

impl<'a, T: Send + 'a> Sync for JoinGuard<'a, T>[src]

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for JoinGuard<'a, T>

impl<'a, T> Send for JoinGuard<'a, T> where
    T: Sync

impl<'a, T> Unpin for JoinGuard<'a, T>

impl<'a, T> !UnwindSafe for JoinGuard<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.