camber.bend relies on unsafe/foreign
raw source on the hub · import bend-kit-camber@0.16.0.2/camber.bend as Camber
Fixed prepared HTTP applications and bounded affine dependency bundles.
11 imports
import Base import bend-kit-http@0.38.6.1/http.bend as Http import bend-kit-router@0.2.0.0/router.bend as Router import bend-kit-router@0.2.0.0/target.bend as Target import bend-kit-json@0.7.2.0/json.bend as Json import ./response.bend as Response import ./input.bend as Input import bend-kit-http@0.38.6.1/completion.bend as TransportCompletion import ./notices.bend as Notices import bend-kit-time@0.3.0.0/time.bend as Time import ./ledger.bend as Book
Types
type ResponseError source · line 14 · raw
Data
InvalidResponseResponseError
InvalidRedirectResponseError
type Counts source · line 52 · raw
Data
Counts@capacity:Nat -> @in_use:Nat -> @completed:Nat -> @rejected:Nat -> Counts
type Outcome source · line 55 · raw
@-E:Data -> @-O:Data -> Data
Success@-E:Data -> @-O:Data -> @value:O -> Outcome<E, O>
Expected@-E:Data -> @-O:Data -> @error:E -> Outcome<E, O>
Exhausted@-E:Data -> @-O:Data -> Outcome<E, O>
Stopped@-E:Data -> @-O:Data -> Outcome<E, O>
type CloseResult source · line 61 · raw
Data
ClosedCloseResult
Busy@counts:Counts -> CloseResult
type Message source · line 65 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type
Submit@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @principal:P -> @input:I -> @reply:Chan(Outcome<E, O>) -> Message<R, P, I, E, O>
Returned@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @resource:R -> Message<R, P, I, E, O>
Inspect@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @reply:Chan(Counts) -> Message<R, P, I, E, O>
Shutdown@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @reply:Chan(CloseResult) -> Message<R, P, I, E, O>
type Context source · line 73 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Data
Copy only this context, never the resources. The inbox bounds queued commands; callers must count blocked submissions inside their transport admission limit.
Context@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @messages:Chan(Message<R, P, I, E, O>) -> Context<R, P, I, E, O>
type Owner source · line 77 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type
The completion future has one affine owner; request contexts copy only inbox.
Owner@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> @finished:Chan(Unit) -> Owner<R, P, I, E, O>
type OwnerClose source · line 80 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type
OwnerClosed@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> OwnerClose<R, P, I, E, O>
OwnerBusy@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> @counts:Counts -> OwnerClose<R, P, I, E, O>
type OwnerStep source · line 197 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> Type
Waiting@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @resources:List<&1, R> -> @ledger:0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger -> OwnerStep<R, P, I, E, O>
Received@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @message:Message<R, P, I, E, O> -> @ledger:0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger -> @resources:List<&1, R> -> OwnerStep<R, P, I, E, O>
Counted@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @reply:Chan(Counts) -> @counted:Pair(Counts, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger) -> @resources:List<&1, R> -> OwnerStep<R, P, I, E, O>
Closing@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @reply:Chan(CloseResult) -> @counted:Pair(Counts, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger) -> @resources:List<&1, R> -> OwnerStep<R, P, I, E, O>
type Group source · line 414 · raw
@-P:Data -> Data
Policies are prepared Data, not callbacks. Later lifecycle stages can consume these root-to-route declarations without splitting patterns or finding groups.
Group@-P:Data -> @id:U32 -> @ancestors:List<&2, U32> -> @policy:P -> Group<P>
type GroupPlan source · line 417 · raw
@-P:Data -> Data
GroupPlan@-P:Data -> @ids:List<&2, U32> -> @policies:List<&2, P> -> GroupPlan<P>
type Route source · line 420 · raw
@-A:Data -> @-P:Data -> Data
Route@-A:Data -> @-P:Data -> @method:String -> @pattern:String -> @action:A -> @groups:List<&2, U32> -> @policy:P -> Route<A, P>
type Endpoint source · line 423 · raw
@-A:Data -> @-P:Data -> Data
Endpoint@-A:Data -> @-P:Data -> @action:A -> @policies:List<&2, P> -> Endpoint<A, P>
type Application source · line 426 · raw
@-A:Data -> @-C:Data -> @-P:Data -> Data
Application@-A:Data -> @-C:Data -> @-P:Data -> @table:0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Table<Endpoint<A, P>> -> @context:C -> @root:P -> @groups:List<&2, GroupPlan<P>> -> Application<A, C, P>
type RegistrationError source · line 429 · raw
Data
RouteError@error:0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Error -> RegistrationError
InvalidGroups@groups:List<&2, U32> -> RegistrationError
type Match source · line 433 · raw
@-P:Data -> Data
Match@-P:Data -> @target:0x9606cc4b1afb0de13a7da7c0f6fc3a82/target.Target -> @params:Map<&2, String> -> @groups:List<&2, U32> -> @method:String -> @pattern:String -> @policies:List<&2, P> -> Match<P>
type Policy source · line 569 · raw
@-H:Data -> Data
Policy@-H:Data -> @id:U32 -> @before:List<&2, H> -> @transforms:List<&2, H> -> Policy<H>
type Metadata source · line 575 · raw
Data
Metadata@method:String -> @target:String -> @headers:Map<&2, List<&2, String>> -> Metadata
type Error source · line 578 · raw
@-E:Data -> Data
ApplicationError@-E:Data -> @error:E -> Error<E>
Framework@-E:Data -> @status:U32 -> @allow:String -> Error<E>
ResponseInvalid@-E:Data -> Error<E>
type Step source · line 606 · raw
@-S:Type -> @-E:Data -> Type
Continue@-S:Type -> @-E:Data -> @state:S -> Step<S, E>
Early@-S:Type -> @-E:Data -> @state:S -> @response:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> Step<S, E>
Reject@-S:Type -> @-E:Data -> @state:S -> @error:Error<E> -> Step<S, E>
type Completion source · line 611 · raw
@-S:Type -> @-H:Data -> Type
Completed@-S:Type -> @-H:Data -> @state:S -> @response:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @stopped:Bool -> Completion<S, H>
type BufferedRequest source · line 932 · raw
Data
The wrapper owns both pipes until its admitted operation really returns. Only disposable HTTP packed buffers cross them, never external handles.
BufferedRequest@metadata:Metadata -> @body:Chan(0xebf36ced2d558f4cbbe00a471fb8031a/http.Body) -> @response:Chan(0xebf36ced2d558f4cbbe00a471fb8031a/http.Res) -> BufferedRequest
type ApplicationReport source · line 935 · raw
@-H:Data -> Data
Dispatched@-H:Data -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @stopped:Bool -> ApplicationReport<H>
CapacityRejected@-H:Data -> ApplicationReport<H>
type ServingContext source · line 939 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Data
ServingContext@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @application:Application<A, K, Policy<H>> -> @owner:Context<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> ServingContext<A, S, K, H>
type Server source · line 943 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Type
Server@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @transport:0xebf36ced2d558f4cbbe00a471fb8031a/http.Server<ServingContext<A, S, K, H>> -> @owner:Owner<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> Server<A, S, K, H>
type StartupError source · line 947 · raw
Data
RegistrationFailed@error:RegistrationError -> StartupError
TransportFailed@error:0xebf36ced2d558f4cbbe00a471fb8031a/http.StartupError -> StartupError
EmptyBundlesStartupError
type ServerExit source · line 952 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> Type
ServerExit@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @transport:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerExit -> @application:OwnerClose<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> ServerExit<A, S, K, H>
type NoticePayload source · line 990 · raw
@-K:Data -> @-H:Data -> Data
NoticePayload@-K:Data -> @-H:Data -> @config:K -> @started:0x598ff14fb52f715fcb963bfff69bb21a/time.Duration -> @application:ApplicationReport<H> -> NoticePayload<K, H>
Definitions
def validate.checked source · line 18 · raw
@valid:Bool -> @response:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>
def validate source · line 25 · raw
@response:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>
def text source · line 33 · raw
@status:U32 -> @value:String -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
def raw source · line 36 · raw
@status:U32 -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
def empty source · line 39 · raw
@status:U32 -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
def redirect.checked source · line 42 · raw
@valid:Bool -> @status:U32 -> @location:String -> Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>
def redirect source · line 49 · raw
@+status:U32 -> @+location:String -> Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>
def owner.context source · line 84 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> Pair(Owner<R, P, I, E, O>, Context<R, P, I, E, O>)
def outcome.value source · line 90 · raw
@-E:Data -> @-O:Data -> @result:Result<&2, &2, E, O> -> Outcome<E, O>
def ledger.snapshot source · line 182 · raw
@counted:Pair(0x3a6b7aed2c90e72a7165d231856ea403/ledger.Counts, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger) -> Pair(Counts, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger)
def ledger.counts source · line 187 · raw
@ledger:0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger -> Pair(Counts, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger)
def ledger.must source · line 190 · raw
@booked:Maybe<&1, 0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger> -> @text:String -> IO(0x3a6b7aed2c90e72a7165d231856ea403/ledger.Ledger)
def receive.value source · line 204 · raw
@-A:Type -> @value:Maybe<&1, A> -> IO(A)
IO.join closes a one-shot channel; the owner inbox must remain reusable.
def receive source · line 211 · raw
@-A:Type -> @channel:Chan(A) -> IO(A)
def submit source · line 316 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> @principal:P -> @input:I -> @reply:Chan(Outcome<E, O>) -> IO(Result<&1, &1, Message<R, P, I, E, O>, Unit>)
def call.accepted source · line 324 · raw
@-T:Type -> @-E:Data -> @-O:Data -> @accepted:Result<&1, &1, T, Unit> -> @+reply:Chan(Outcome<E, O>) -> IO(Outcome<E, O>)
def call source · line 336 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> @principal:P -> @input:I -> IO(Outcome<E, O>)
def inspect.value source · line 345 · raw
@value:Maybe<&1, Counts> -> Maybe<&2, Counts>
def inspect.sent source · line 352 · raw
@-T:Type -> @sent:Result<&1, &1, T, Unit> -> @+reply:Chan(Counts) -> IO(Maybe<&2, Counts>)
def inspect source · line 364 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @context:Context<R, P, I, E, O> -> IO(Maybe<&2, Counts>)
def close.sent source · line 372 · raw
@-T:Type -> @sent:Result<&1, &1, T, Unit> -> @+reply:Chan(CloseResult) -> IO(CloseResult)
def close.join source · line 384 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)
def close.completed source · line 392 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @result:CloseResult -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)
def close source · line 403 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @owner:Owner<R, P, I, E, O> -> IO(OwnerClose<R, P, I, E, O>)
Stop external admissions before close. Busy preserves live context/capacity; retry after admitted operations finish. Stalled operations remain observable.
def groups.equal source · line 436 · raw
@xs:List<&2, U32> -> @ys:List<&2, U32> -> Bool
def minimal source · line 615 · raw
0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
Application completion only: no socket write, duration, or peer-receipt claim.
def problem.allow source · line 618 · raw
@add:Bool -> @headers:Map<&2, List<&2, String>> -> @allow:String -> Map<&2, List<&2, String>>
def problem.response source · line 623 · raw
@allow:String -> @response:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
def problem source · line 627 · raw
@+status:U32 -> @title:String -> @allow:String -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
def metadata.authority source · line 836 · raw
@authority:Maybe<&2, String> -> @meta:Metadata -> Metadata
def server.config source · line 955 · raw
@port:U32 -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig
Templates
template json source · line 30 · raw
@-T:Type -> @-encode:(@_:T -> 0x9d03a1a34430d43e5d09adba8724f726/json.Val) -> @status:U32 -> @value:T -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
The encoder is an explicit public projection, never record reflection.
template dispose source · line 97 · raw
@-R:Type -> @-destroy:(@_:R -> IO(Unit)) -> @resources:List<&1, R> -> IO(Unit)
template drain.message source · line 108 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @message:Message<R, P, I, E, O> -> IO(Unit)
Closing Base channels retains buffered messages. Drain them and answer stopped callers, rather than stranding accepted commands behind the close command.
template work.returned source · line 127 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @accepted:Result<&1, &1, Message<R, P, I, E, O>, Unit> -> IO(Unit)
The resources return through the private owner protocol BEFORE a disposable caller reply. A closed caller reply cannot erase a handle or strand capacity.
template work.return source · line 136 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @messages:Chan(Message<R, P, I, E, O>) -> @reply:Chan(Outcome<E, O>) -> @result:Pair(R, Result<&2, &2, E, O>) -> IO(Unit)
template work source · line 148 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @resource:R -> @principal:P -> @input:I -> @messages:Chan(Message<R, P, I, E, O>) -> @reply:Chan(Outcome<E, O>) -> IO(Unit)
template drain.step source · line 157 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @pending:Maybe<&1, Message<R, P, I, E, O>> -> @next:(@_:Unit -> IO(Unit)) -> IO(Unit)
template drain source · line 170 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-destroy:(@_:R -> IO(Unit)) -> @fuel:Nat -> @+messages:Chan(Message<R, P, I, E, O>) -> IO(Unit)
The closed inbox contains at most room buffered messages.
template build.step source · line 268 · raw
@-R:Type -> @-E:Data -> @-destroy:(@_:R -> IO(Unit)) -> @result:Result<&2, &1, E, R> -> @resources:List<&1, R> -> @next:(@_:List<&1, R> -> IO(Result<&2, &1, E, List<&1, R>>)) -> IO(Result<&2, &1, E, List<&1, R>>)
template build source · line 280 · raw
@-K:Data -> @-R:Type -> @-E:Data -> @-create:(@_:K -> @_:Nat -> IO(Result<&2, &1, E, R>)) -> @-destroy:(@_:R -> IO(Unit)) -> @remaining:Nat -> @+config:K -> @resources:List<&1, R> -> IO(Result<&2, &1, E, List<&1, R>>)
template start.ready source · line 291 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @capacity:Nat -> @+room:U32 -> @result:Result<&2, &1, E, List<&1, R>> -> IO(Result<&2, &1, E, Owner<R, P, I, E, O>>)
template start source · line 307 · raw
@-K:Data -> @-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-create:(@_:K -> @_:Nat -> IO(Result<&2, &1, E, R>)) -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @config:K -> @+capacity:Nat -> @room:U32 -> IO(Result<&2, &1, E, Owner<R, P, I, E, O>>)
The initializer closes partial handles within a failed bundle; start closes all prior whole bundles. No workers exist until the complete set opens.
template group.pick source · line 445 · raw
@-P:Data -> @same:Bool -> @group:Group<P> -> @later:(@_:Unit -> Maybe<&2, Group<P>>) -> Maybe<&2, Group<P>>
template group.find source · line 452 · raw
@-P:Data -> @groups:List<&2, Group<P>> -> @+id:U32 -> Maybe<&2, Group<P>>
template group.checked source · line 459 · raw
@-P:Data -> @same:Bool -> @policy:P -> Maybe<&2, P>
template group.policy source · line 466 · raw
@-P:Data -> @found:Maybe<&2, Group<P>> -> @ancestors:List<&2, U32> -> Maybe<&2, P>
template groups.policies source · line 473 · raw
@-P:Data -> @ids:List<&2, U32> -> @+declared:List<&2, Group<P>> -> @+ancestors:List<&2, U32> -> Maybe<&2, List<&2, P>>
template groups.unique source · line 483 · raw
@-P:Data -> @found:Maybe<&2, Group<P>> -> Bool
template groups.valid source · line 490 · raw
@-P:Data -> @groups:List<&2, Group<P>> -> @+all:List<&2, Group<P>> -> Bool
template routes.policies source · line 498 · raw
@-P:Data -> @result:Maybe<&2, List<&2, P>> -> @ids:List<&2, U32> -> Result<&2, &2, RegistrationError, List<&2, P>>
template routes.prepare source · line 505 · raw
@-A:Data -> @-P:Data -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @+root:P -> Result<&2, &2, RegistrationError, List<&2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Entry<Endpoint<A, P>>>>
template groups.prepare source · line 515 · raw
@-P:Data -> @groups:List<&2, Group<P>> -> @+all:List<&2, Group<P>> -> Result<&2, &2, RegistrationError, List<&2, GroupPlan<P>>>
template groups.select source · line 526 · raw
@-P:Data -> @same:Bool -> @policies:List<&2, P> -> @later:(@_:Unit -> List<&2, P>) -> List<&2, P>
template groups.prepared source · line 531 · raw
@-P:Data -> @plans:List<&2, GroupPlan<P>> -> @+ids:List<&2, U32> -> List<&2, P>
template application.table source · line 538 · raw
@-A:Data -> @-C:Data -> @-P:Data -> @result:Result<&2, &2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Error, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Table<Endpoint<A, P>>> -> @context:C -> @root:P -> @groups:List<&2, GroupPlan<P>> -> Result<&2, &2, RegistrationError, Application<A, C, P>>
template application.valid source · line 545 · raw
@-A:Data -> @-C:Data -> @-P:Data -> @valid:Bool -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @context:C -> @+root:P -> Result<&2, &2, RegistrationError, Application<A, C, P>>
template application source · line 556 · raw
@-A:Data -> @-C:Data -> @-P:Data -> @routes:List<&2, Route<A, P>> -> @+groups:List<&2, Group<P>> -> @context:C -> @root:P -> Result<&2, &2, RegistrationError, Application<A, C, P>>
Construction is pure and fallible; no listener or owner is started here.
template describe source · line 559 · raw
@-A:Data -> @-C:Data -> @-P:Data -> @app:Application<A, C, P> -> List<&2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Description>
template plain source · line 564 · raw
@-handler:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(0xebf36ced2d558f4cbbe00a471fb8031a/http.Res)) -> @req:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>)
A closed template can run repeatedly; an affine callback registry cannot.
template policy source · line 572 · raw
@-H:Data -> @id:U32 -> @before:List<&2, H> -> @transforms:List<&2, H> -> Policy<H>
template input source · line 584 · raw
@-I:Type -> @-E:Data -> @outcome:Result<&2, &1, U32, I> -> Result<&2, &1, Error<E>, I>
Adapt reusable input status failures to the existing one-pass dispatch mapper.
template execute.decoded source · line 589 · raw
@-I:Type -> @-S:Type -> @-K:Data -> @-E:Data -> @-handler:(@_:S -> @_:K -> @_:I -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @outcome:Result<&2, &1, Error<E>, I> -> @state:S -> @config:K -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))
template execute source · line 599 · raw
@-I:Type -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-decoder:(@_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> Result<&2, &1, Error<E>, I>) -> @-handler:(@_:S -> @_:K -> @_:I -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @state:S -> @+config:K -> @selected:Match<Policy<H>> -> @req:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))
An executor, not a second dispatcher: call from dispatch's run template, after all applicable before hooks. Only validated typed input reaches business IO.
template default.error source · line 630 · raw
@-E:Data -> @error:Error<E> -> 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res
template default.mapper source · line 647 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @state:S -> @config:K -> @error:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))
template mapped.checked source · line 650 · raw
@-S:Type -> @-H:Data -> @state:S -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> @result:Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res> -> Completion<S, H>
template mapped.result source · line 657 · raw
@-S:Type -> @-E:Data -> @-H:Data -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> @result:Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>) -> Completion<S, H>
template failed source · line 665 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @mapped:Bool -> @state:S -> @config:K -> @error:Error<E> -> @entered:List<&2, Policy<H>> -> @stopped:Bool -> IO(Completion<S, H>)
template result source · line 677 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @outcome:Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>) -> IO(Completion<S, H>)
template before.next source · line 688 · raw
@-S:Type -> @-E:Data -> @step:Step<S, E> -> @next:(@_:S -> IO(Step<S, E>)) -> IO(Step<S, E>)
template before source · line 697 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @hooks:List<&2, H> -> @state:S -> @+config:K -> @+meta:Metadata -> IO(Step<S, E>)
template transformed source · line 709 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @outcome:Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>) -> IO(Completion<S, H>)
template transforms source · line 720 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @hooks:List<&2, H> -> @+config:K -> @completion:Completion<S, H> -> IO(Completion<S, H>)
template entered.step source · line 738 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @config:K -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> @step:Step<S, E> -> @next:(@_:S -> @_:List<&2, Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)) -> IO(Completion<S, H>)
template scopes source · line 750 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @policies:List<&2, Policy<H>> -> @state:S -> @+config:K -> @+meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> @next:(@_:S -> @_:List<&2, Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)) -> IO(Completion<S, H>)
template finish.checked source · line 767 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @state:S -> @config:K -> @entered:List<&2, Policy<H>> -> @mapped:Bool -> @stopped:Bool -> @checked:Result<&2, &1, ResponseError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res> -> IO(Completion<S, H>)
template finish source · line 777 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @config:K -> @completion:Completion<S, H> -> IO(Completion<S, H>)
template policies.tail source · line 784 · raw
@-H:Data -> @policies:List<&2, Policy<H>> -> List<&2, Policy<H>>
template endpoint source · line 792 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @action:A -> @state:S -> @+config:K -> @selected:Match<Policy<H>> -> @meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)
template framework source · line 802 · raw
@-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @+status:U32 -> @allow:String -> @state:S -> @config:K -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)
template choice source · line 812 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @selected:0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Choice<Endpoint<A, Policy<H>>> -> @target:0x9606cc4b1afb0de13a7da7c0f6fc3a82/target.Target -> @groups:List<&2, GroupPlan<Policy<H>>> -> @state:S -> @+config:K -> @+meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)
template resolved source · line 844 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @outcome:Result<&2, &2, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Error, 0x9606cc4b1afb0de13a7da7c0f6fc3a82/router.Resolved<Endpoint<A, Policy<H>>>> -> @groups:List<&2, GroupPlan<Policy<H>>> -> @state:S -> @config:K -> @meta:Metadata -> @entered:List<&2, Policy<H>> -> @body:0xebf36ced2d558f4cbbe00a471fb8031a/http.Body -> IO(Completion<S, H>)
template dispatch.application source · line 859 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Completion<S, H>)
template access.disabled source · line 875 · raw
@-K:Data -> @config:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access
template notice.ignore source · line 878 · raw
@-N:Data -> @-H:Data -> @-E:Data -> @observer:N -> @policy:Policy<H> -> @notice:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)
template notice.error.ignore source · line 881 · raw
@-N:Data -> @-E:Data -> @observer:N -> @error:E -> IO(Unit)
template notice.result source · line 884 · raw
@-N:Data -> @-E:Data -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @result:Result<&2, &2, E, Unit> -> IO(Unit)
template notices source · line 889 · raw
@-N:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @entered:List<&2, Policy<H>> -> @+observer:N -> @+notice:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Unit)
template dispatch.completed source · line 902 · raw
@-S:Type -> @-N:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @access:0x3a6b7aed2c90e72a7165d231856ea403/notices.Access -> @started:0x598ff14fb52f715fcb963bfff69bb21a/time.Duration -> @completion:Completion<S, H> -> IO(Completion<S, H>)
template dispatch source · line 916 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-N:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-notify:(@_:N -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:N -> @_:E -> IO(Unit)) -> @observer:N -> @access:0x3a6b7aed2c90e72a7165d231856ea403/notices.Access -> @app:Application<A, K, Policy<H>> -> @state:S -> @req:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Completion<S, H>)
The same application pipeline is used live; only this boundary emits direct notices.
template server.bundles.cons source · line 958 · raw
@-S:Type -> @resource:S -> @counted:Pair(List<&1, S>, Nat) -> Pair(List<&1, S>, Nat)
template server.bundles source · line 962 · raw
@-S:Type -> @resources:List<&1, S> -> Pair(List<&1, S>, Nat)
template server.work.completed source · line 968 · raw
@-S:Type -> @-H:Data -> @response_channel:Chan(0xebf36ced2d558f4cbbe00a471fb8031a/http.Res) -> @completion:Completion<S, H> -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))
template server.work source · line 976 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @state:S -> @app:Application<A, K, Policy<H>> -> @input:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))
template server.notified source · line 993 · raw
@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @+config:K -> @+notice:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> @application:ApplicationReport<H> -> @status:U32 -> @outcome:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Outcome -> IO(Unit)
template server.completed.report source · line 1011 · raw
@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @config:K -> @duration:0x598ff14fb52f715fcb963bfff69bb21a/time.Duration -> @application:ApplicationReport<H> -> @+status:U32 -> @+outcome:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Outcome -> IO(Unit)
template server.completed source · line 1025 · raw
@-K:Data -> @-H:Data -> @-E:Data -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @completion:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<NoticePayload<K, H>> -> IO(Unit)
template server.response source · line 1036 · raw
@-K:Data -> @-H:Data -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<NoticePayload<K, H>> -> IO(Unit)) -> @config:K -> @started:0x598ff14fb52f715fcb963bfff69bb21a/time.Duration -> @outcome:Outcome<Unit, ApplicationReport<H>> -> @+body:Chan(0xebf36ced2d558f4cbbe00a471fb8031a/http.Body) -> @+response:Chan(0xebf36ced2d558f4cbbe00a471fb8031a/http.Res) -> IO(0xebf36ced2d558f4cbbe00a471fb8031a/http.Reply)
template server.handle source · line 1057 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<NoticePayload<K, H>> -> IO(Unit)) -> @context:ServingContext<A, S, K, H> -> @req:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(0xebf36ced2d558f4cbbe00a471fb8031a/http.Reply)
template server.started source · line 1074 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @+context:Context<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> @room:U32 -> @capacity:Nat -> @started:Pair(List<&1, S>, Result<&2, &1, 0xebf36ced2d558f4cbbe00a471fb8031a/http.StartupError, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Server<ServingContext<A, S, K, H>>>) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)
template server.prepared source · line 1095 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @app:Application<A, K, Policy<H>> -> @+config:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig -> @resources:Pair(List<&1, S>, Nat) -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)
template server.valid source · line 1115 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @valid:Bool -> @app:Application<A, K, Policy<H>> -> @config:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)
template server.registered source · line 1127 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-work:(@_:S -> @_:Application<A, K, Policy<H>> -> @_:BufferedRequest -> IO(Pair(S, Result<&2, &2, Unit, ApplicationReport<H>>))) -> @-destroy:(@_:S -> IO(Unit)) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @+config:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)
template server.start source · line 1140 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, Server<A, S, K, H>>)
template server.control.result source · line 1153 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @controlled:Pair(0xebf36ced2d558f4cbbe00a471fb8031a/http.Server<ServingContext<A, S, K, H>>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerControl) -> @owner:Owner<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> Pair(Server<A, S, K, H>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerControl)
template server.control source · line 1160 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerControl)
template server.observer.result source · line 1164 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @observed:Pair(0xebf36ced2d558f4cbbe00a471fb8031a/http.Server<ServingContext<A, S, K, H>>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerStats) -> @owner:Owner<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>> -> Pair(Server<A, S, K, H>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerStats)
template server.observer source · line 1171 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerStats)
template server.dependencies source · line 1175 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> Pair(Server<A, S, K, H>, Context<S, Application<A, K, Policy<H>>, BufferedRequest, Unit, ApplicationReport<H>>)
template server.run source · line 1180 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-E:Data -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @server:Server<A, S, K, H> -> IO(ServerExit<A, S, K, H>)
template server.close source · line 1198 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @server:Server<A, S, K, H> -> IO(ServerExit<A, S, K, H>)
Without starting the run loop, the caller still explicitly drains transport and joins application cleanup. A stop request alone is never completion.
template serve.started source · line 1205 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-H:Data -> @-E:Data -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @started:Result<&2, &1, StartupError, Server<A, S, K, H>> -> IO(Result<&2, &1, StartupError, ServerExit<A, S, K, H>>)
template serve source · line 1220 · raw
@-A:Data -> @-S:Type -> @-K:Data -> @-E:Data -> @-H:Data -> @-before_hook:(@_:H -> @_:S -> @_:K -> @_:Metadata -> IO(Step<S, E>)) -> @-after_hook:(@_:H -> @_:S -> @_:K -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Res -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-run:(@_:A -> @_:S -> @_:K -> @_:Match<Policy<H>> -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/http.Req -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-mapper:(@_:S -> @_:K -> @_:Error<E> -> IO(Pair(S, Result<&2, &1, Error<E>, 0xebf36ced2d558f4cbbe00a471fb8031a/http.Res>))) -> @-destroy:(@_:S -> IO(Unit)) -> @-done:(@_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Completion<ApplicationReport<H>> -> IO(Unit)) -> @-observe:(@_:U32 -> @_:0xebf36ced2d558f4cbbe00a471fb8031a/completion.Outcome -> IO(Unit)) -> @-notify:(@_:K -> @_:Policy<H> -> @_:0x3a6b7aed2c90e72a7165d231856ea403/notices.Notice -> IO(Result<&2, &2, E, Unit>)) -> @-report:(@_:K -> @_:E -> IO(Unit)) -> @-access:(@_:K -> 0x3a6b7aed2c90e72a7165d231856ea403/notices.Access) -> @registration:Result<&2, &2, RegistrationError, Application<A, K, Policy<H>>> -> @config:0xebf36ced2d558f4cbbe00a471fb8031a/http.ServerConfig -> @resources:List<&1, S> -> IO(Result<&2, &1, StartupError, ServerExit<A, S, K, H>>)
Owners that need readiness/control use server.start then server.run instead.
Unsafe
unsafe owner source · line 218 · raw
@-R:Type -> @-P:Data -> @-I:Data -> @-E:Data -> @-O:Data -> @-handler:(@_:R -> @_:P -> @_:I -> IO(Pair(R, Result<&2, &2, E, O>))) -> @-destroy:(@_:R -> IO(Unit)) -> @+messages:Chan(Message<R, P, I, E, O>) -> @+room:U32 -> @step:OwnerStep<R, P, I, E, O> -> IO(Unit)
Only idle close ends this loop. Busy close never waits on a stalled handler. @unsafe is solely the lifecycle receive loop, not a termination/proof claim.