pub trait CollectIndexedMeshExt<T>: Iterator<Item = (usize, T)> + Sized {
// Required method
fn collect_indexed<M>(self, region: Region) -> Result<M, M::Error>
where M: BuildFromRegionIndexed<T>;
}
Expand description
Indexed collecting adapter.
Consume (rank, value)
pairs plus a Region
and build a mesh
via BuildFromRegionIndexed
.
§Semantics (recommended contract)
Implementations of BuildFromRegionIndexed
are expected to
enforce:
- Coverage: every rank in
0..region.num_ranks()
is provided at least once. - Bounds: any out-of-bounds rank (
rank >= num_ranks
) is an error. - Duplicates: allowed; last write wins.
- Missing ranks: an error (incomplete coverage).
§Errors
Propagates whatever BuildFromRegionIndexed::build_indexed
returns (e.g., a cardinality/bounds error) from the target mesh
type.
See also: BuildFromRegionIndexed
for the authoritative policy.
Required Methods§
fn collect_indexed<M>(self, region: Region) -> Result<M, M::Error>where
M: BuildFromRegionIndexed<T>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.