Camber.server.prepared: def of bend-kit-camber@0.15.0.1 Import: import bend-kit-camber@0.15.0.1/camber.bend as Camber Lines 1139-1157 of bend-kit-camber@0.15.0.1/camber.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-camber@0.15.0.1/camber.bend&start_line=1139&end_line=1157 import Base import bend-kit-http@0.38.1.1/http.bend as Http def server.prepared(~A: Data, ~S: Type, ~K: Data, ~H: Data, ~work: S -> Application> -> BufferedRequest -> IO(S & Result<&2, &2, Unit, ApplicationReport>), ~destroy: S -> IO(Unit), app: Application>, +config: Http.ServerConfig, resources: List & Nat ) -> IO(Result<&2, &1, StartupError, Server>): Http.ServerConfig{host, port, body, headers, connections, requests, +buffered, hm, bm, im, wm} = config (bundles, capacity) = resources match capacity: case 0n: do IO>>: dispose(~S, ~destroy, bundles) return Fail{EmptyBundles{}} case 1n+ +rest: do IO>>: messages : Chan(Message>, BufferedRequest, Unit, ApplicationReport>) <- Chan.new(Message>, BufferedRequest, Unit, ApplicationReport>, buffered) +context : Context>, BufferedRequest, Unit, ApplicationReport> = Context{messages} started : List & Result<&2, &1, Http.StartupError, Http.Server>> <- Http.server.start(~ServingContext, ~List, ServingContext{app, context}, bundles, config) server.started(~A, ~S, ~K, ~H, ~work, ~destroy, context, buffered, 1n+rest, started) Uses (26): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.new https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Sigma https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Application https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=ApplicationReport https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=BufferedRequest https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Context https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Message https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Policy https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=Server https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=ServingContext https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=StartupError https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=dispose https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=server.started https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=Server https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=ServerConfig https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=StartupError https://jend.leeeet.dev/definition.txt?path=bend-kit-http@0.38.2.0/http.bend&name=server.start