# PhysicsResultEnumerable<T, TFilter>

> A lazy, allocation-free view over a physics result array that yields only the elements a filter keeps.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.U2D.Physics](/engine/6000.7/script-reference/unity/u2d/physics.md)
* **Assembly:** UnityEngine.PhysicsCore2DModule

```csharp
public readonly ref struct PhysicsResultEnumerable<T, TFilter> where T : unmanaged where TFilter : IPhysicsResultFilter<T>
```

## Remarks

This is a ref struct so it cannot escape to the heap, which keeps the enumeration Burst-compatible. It does not own the source array and never disposes it, so disposal stays with whoever created the results.

## Constructors

| Constructor                                                                                                                                               | Description                                         |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
| [PhysicsResultEnumerable\`2(Unity.Collections.NativeArray\{\`0},\`1)](/engine/6000.7/script-reference/unity/u2d/physics/physicsresultenumerable2/ctor.md) | Create a filtered view over a physics result array. |

## Methods

| Method                                                                                                       | Description                                                                      |
| ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| [GetEnumerator](/engine/6000.7/script-reference/unity/u2d/physics/physicsresultenumerable2/getenumerator.md) | Get an enumerator that walks the source array and yields only the kept elements. |

## Structs

| Struct                                                                                                                                      | Description                                                                 |
| ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [PhysicsResultEnumerable\<T, TFilter>.Enumerator](/engine/6000.7/script-reference/unity/u2d/physics/physicsresultenumerable2/enumerator.md) | Walks a physics result array and yields only the elements the filter keeps. |
