pub trait JoinHandleExt<T> {
// Required methods
fn valid_result(self, x: T) -> bool;
fn join_unwrap(self) -> T;
}Expand description
Extension trait for JoinHandle.
Required Methods§
Sourcefn valid_result(self, x: T) -> bool
fn valid_result(self, x: T) -> bool
Predicate that specifies the valid return results for the handle.
⚠
Sourcefn join_unwrap(self) -> T
fn join_unwrap(self) -> T
This function is a wrapper self.join().unwrap().
This function panics only on stack-overflow or OOM on the spawned thread.
ensures
self.valid_result(result)Implementations on Foreign Types§
Source§impl<T> JoinHandleExt<T> for ScopedJoinHandle<'_, T>
impl<T> JoinHandleExt<T> for ScopedJoinHandle<'_, T>
Source§fn valid_result(self, _x: T) -> bool
fn valid_result(self, _x: T) -> bool
(opaque) ⚠
Source§fn join_unwrap(self) -> T
fn join_unwrap(self) -> T
ensures
self.valid_result(result)Source§impl<T> JoinHandleExt<T> for JoinHandle<T>
impl<T> JoinHandleExt<T> for JoinHandle<T>
Source§fn valid_result(self, _x: T) -> bool
fn valid_result(self, _x: T) -> bool
(opaque) ⚠
Source§fn join_unwrap(self) -> T
fn join_unwrap(self) -> T
ensures
self.valid_result(result)