Struct RasterAllocatedTransformResult
Result carrier for one allocating transform.
struct RasterAllocatedTransformResult(T);
On success this object retains an independently owned one-plane RasterLease. Calling lease() returns another O(1) retained owner copy.
The result deliberately reuses RasterLease rather than introducing a second ownership type. transformInto() remains the semantic execution primitive.
Properties
| Name | Type | Description |
|---|---|---|
error[get]
|
RasterAllocatedTransformError | High-level failure category. |
ok[get]
|
bool | Whether allocation, retained construction and transform all succeeded. |
transformError[get]
|
RasterTransformError | Underlying transformInto() failure when error == transformFailed. |
Methods
| Name | Description |
|---|---|
lease
()
|
Returns an O(1) retained copy of the successful output owner. |
Example
Example inspecting the deliberately failing default result.
import raster;
RasterAllocatedTransformResult!ubyte result;
assert(!result .ok);
assert(
result .error
== RasterAllocatedTransformError .internalFailure
);
assert(
result .transformError
== RasterTransformError .none
);
assert(result .lease() .view() .planeCount == 0);