withMutableElements(_:)
Provides mutable access to the per-vertex data within a callback.
Declaration
mutating func withMutableElements<Result>(_ callback: @_lifetime(0: copy 0) (inout MutableSpan<ElementType>) -> Result) -> ResultParameters
- callback:
A closure that receives a mutable span over the per-vertex data.
Return Value
The value returned by callback.
Discussion
The provided span is only valid for the lifetime of the callback.