Camber.server.started: def of bend-kit-camber@0.15.0.1 Import: import bend-kit-camber@0.15.0.1/camber.bend as Camber Lines 1118-1137 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=1118&end_line=1137 import Base import bend-kit-http@0.38.1.1/http.bend as Http def server.started(~A: Data, ~S: Type, ~K: Data, ~H: Data, ~work: S -> Application> -> BufferedRequest -> IO(S & Result<&2, &2, Unit, ApplicationReport>), ~destroy: S -> IO(Unit), +context: Context>, BufferedRequest, Unit, ApplicationReport>, room: U32, capacity: Nat, started: List & Result<&2, &1, Http.StartupError, Http.Server>> ) -> IO(Result<&2, &1, StartupError, Server>): Context{+messages} = context (resources, result) = started match result: case Fail{error}: do IO>>: dispose(~S, ~destroy, resources) Chan.close(Message>, BufferedRequest, Unit, ApplicationReport>, messages) return Fail{TransportFailed{error}} case Done{transport}: do IO>>: finished : Chan(Unit) <- IO.fork(Unit, owner(~S, ~Application>, ~BufferedRequest, ~Unit, ~ApplicationReport, ~work, ~destroy, messages, room, Waiting{resources, ledger.open(capacity)})) return Done{Server{transport, Owner{Context{messages}, finished}}} Uses (29): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Chan.close 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.fork 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=U32 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=Owner https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=OwnerStep 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=ledger.open https://jend.leeeet.dev/definition.txt?path=bend-kit-camber@0.15.0.1/camber.bend&name=owner 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=StartupError