# makeRouteExecutor

Creates a scoped executor for route candidate decoding and selection.

## Signatures

```ts
export declare function makeRouteExecutor<A, E = never, R = never>(): Effect.Effect<RouteExecutor<A, E, R>, never, R | Scope.Scope>;
```

## Why

One owner coordinates layer rollback, guard order, layout reuse, catch boundaries, and handler finalization.

## Ownership and lifetime

The returned Effect must run inside the Scope that will own the executor. Do not let the executor escape
that Scope: closing it interrupts the selected handler and finalizes all Layer, layout, and catch children.

## Examples

```ts
import * as Router from "@typed/router"
import * as Effect from "effect/Effect"

const useExecutor = Effect.scoped(
  Effect.gen(function* () {
    yield* Router.makeRouteExecutor<string>()
    yield* Effect.log("route executor is owned by this scope")
  })
)
```
