pub struct MessageMutParIter<'a, E>where
E: Message,{ /* private fields */ }Expand description
A parallel iterator over Messages.
Implementations§
Source§impl<'a, E> MessageMutParIter<'a, E>where
E: Message,
impl<'a, E> MessageMutParIter<'a, E>where
E: Message,
Sourcepub fn new(
mutator: &'a mut MessageCursor<E>,
messages: &'a mut Messages<E>,
) -> MessageMutParIter<'a, E>
pub fn new( mutator: &'a mut MessageCursor<E>, messages: &'a mut Messages<E>, ) -> MessageMutParIter<'a, E>
Creates a new parallel iterator over messages that have not yet been seen by mutator.
Sourcepub fn batching_strategy(
self,
strategy: BatchingStrategy,
) -> MessageMutParIter<'a, E>
pub fn batching_strategy( self, strategy: BatchingStrategy, ) -> MessageMutParIter<'a, E>
Changes the batching strategy used when iterating.
For more information on how this affects the resultant iteration, see
BatchingStrategy.
Sourcepub fn for_each<FN>(self, func: FN)
pub fn for_each<FN>(self, func: FN)
Runs the provided closure for each unread message in parallel.
Unlike normal iteration, the message order is not guaranteed in any form.
§Panics
If the ComputeTaskPool is not initialized. If using this from a message reader that is being
initialized and run from the ECS scheduler, this should never panic.
Sourcepub fn for_each_with_id<FN>(self, func: FN)
pub fn for_each_with_id<FN>(self, func: FN)
Runs the provided closure for each unread message in parallel, like for_each,
but additionally provides the MessageId to the closure.
Note that the order of iteration is not guaranteed, but MessageIds are ordered by send order.
§Panics
If the ComputeTaskPool is not initialized. If using this from a message reader that is being
initialized and run from the ECS scheduler, this should never panic.
Trait Implementations§
Source§impl<'a, E> Debug for MessageMutParIter<'a, E>
impl<'a, E> Debug for MessageMutParIter<'a, E>
Source§impl<'a, E> IntoIterator for MessageMutParIter<'a, E>where
E: Message,
impl<'a, E> IntoIterator for MessageMutParIter<'a, E>where
E: Message,
Source§type IntoIter = MessageMutIteratorWithId<'a, E>
type IntoIter = MessageMutIteratorWithId<'a, E>
Source§type Item = <<MessageMutParIter<'a, E> as IntoIterator>::IntoIter as Iterator>::Item
type Item = <<MessageMutParIter<'a, E> as IntoIterator>::IntoIter as Iterator>::Item
Source§fn into_iter(self) -> <MessageMutParIter<'a, E> as IntoIterator>::IntoIter
fn into_iter(self) -> <MessageMutParIter<'a, E> as IntoIterator>::IntoIter
Auto Trait Implementations§
impl<'a, E> Freeze for MessageMutParIter<'a, E>
impl<'a, E> RefUnwindSafe for MessageMutParIter<'a, E>where
E: RefUnwindSafe,
impl<'a, E> Send for MessageMutParIter<'a, E>
impl<'a, E> Sync for MessageMutParIter<'a, E>
impl<'a, E> Unpin for MessageMutParIter<'a, E>
impl<'a, E> !UnwindSafe for MessageMutParIter<'a, E>
Blanket Implementations§
Source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more