Struct BarrierWaitResult

struct BarrierWaitResult(_)

A BarrierWaitResult is returned by [Barrier::wait()] when all threads in the Barrier have rendezvoused.

Examples

use std::sync::Barrier;

let barrier = Barrier::new(1);
let barrier_wait_result = barrier.wait();

Implementations

impl BarrierWaitResult

fn is_leader(self: &Self) -> bool

Returns true if this thread is the "leader thread" for the call to [Barrier::wait()].

Only one thread will have true returned from their result, all other threads will have false returned.

Examples

use std::sync::Barrier;

let barrier = Barrier::new(1);
let barrier_wait_result = barrier.wait();
println!("{:?}", barrier_wait_result.is_leader());

impl Debug for BarrierWaitResult

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Freeze for BarrierWaitResult

impl RefUnwindSafe for BarrierWaitResult

impl Send for BarrierWaitResult

impl Sync for BarrierWaitResult

impl Unpin for BarrierWaitResult

impl UnsafeUnpin for BarrierWaitResult

impl UnwindSafe for BarrierWaitResult

impl<T> Any for BarrierWaitResult

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for BarrierWaitResult

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for BarrierWaitResult

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

impl<T> From for BarrierWaitResult

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into for BarrierWaitResult

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for BarrierWaitResult

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for BarrierWaitResult

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