bundle_provider.bend

bendvy-ecs-core@0.1.0.1 · 9 lines · 0 definitions

1import Base
2import schema_fragments.bend as SF
3import capabilities.bend as Owned
4
5def provision_declared(~S:Data,~Owners:Type,~Output:Type,~build:Owners -> Output,fragment:SF.Fragment<S,Owners>,required:List<&2,SF.Entry<S>>) -> SF.Bound<S,Owners,Output>:
6  SF.bind_declared(~S,~Owners,~Output,~build,fragment,required)
7
8def provide_owned(~Owner:Type,~Input:Type,~Output:Type,~Args:Type,~BodyOutput:Type,~request:Owner -> Input -> Owner & Output,~body:@-H:Type -> @-cap:Owned.OwnedRequest<H,Input,Output> -> Args -> H -> H & BodyOutput,args:Args,ctx:Owner) -> Owner & BodyOutput:
9  Owned.invoke_owned(~h => Owned.OwnedRequest<h,Input,Output>,~Args,~BodyOutput,~body,~Owner,~Owned.OwnedRequest{request},args,ctx)