Struct BroadcastContext

struct BroadcastContext<'a> { ... }

Provides context to a closure called by broadcast.

Implementations

impl<'a> BroadcastContext<'a>

fn index(self: &Self) -> usize

Our index amongst the broadcast threads (ranges from 0..self.num_threads()).

fn num_threads(self: &Self) -> usize

The number of threads receiving the broadcast in the thread pool.

Future compatibility note

Future versions of Rayon might vary the number of threads over time, but this method will always return the number of threads which are actually receiving your particular broadcast call.

impl<'a> Debug for BroadcastContext<'a>

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

impl<'a> Freeze for BroadcastContext<'a>

impl<'a> RefUnwindSafe for BroadcastContext<'a>

impl<'a> Send for BroadcastContext<'a>

impl<'a> Sync for BroadcastContext<'a>

impl<'a> Unpin for BroadcastContext<'a>

impl<'a> UnsafeUnpin for BroadcastContext<'a>

impl<'a> UnwindSafe for BroadcastContext<'a>

impl<T> Any for BroadcastContext<'a>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for BroadcastContext<'a>

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

impl<T> BorrowMut for BroadcastContext<'a>

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

impl<T> From for BroadcastContext<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for BroadcastContext<'a>

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into for BroadcastContext<'a>

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 BroadcastContext<'a>

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

impl<T, U> TryInto for BroadcastContext<'a>

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