pub trait Iterable<T>: Sizedwhere
T: CubeType,{
// Required methods
fn expand(
self,
scope: &mut Scope,
body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType),
);
fn expand_unroll(
self,
scope: &mut Scope,
body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType),
);
// Provided method
fn const_len(&self) -> Option<usize> { ... }
}Expand description
Something that can be iterated on by a for loop. Currently only includes Range, StepBy and
Sequence.
Required Methods§
Sourcefn expand(
self,
scope: &mut Scope,
body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType),
)
fn expand( self, scope: &mut Scope, body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType), )
Sourcefn expand_unroll(
self,
scope: &mut Scope,
body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType),
)
fn expand_unroll( self, scope: &mut Scope, body: impl FnMut(&mut Scope, <T as CubeType>::ExpandType), )
Expand an unrolled loop. The body should be invoced n times, where n is the number of
iterations.
§Arguments
scope- the expansion scopebody- the loop body to be executed repeatedly
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".