-{"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r"},"abstract":[{"text":"Initialize with a closure handler over generic ","type":"text"},{"code":"Input","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"Output","type":"codeVoice"},{"text":" types.","type":"text"}],"kind":"symbol","metadata":{"symbolKind":"init","externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV4bodyACyxq_Gq_x_AA13LambdaContextVtYaKc_tcSER_rlufc","title":"init(body:)","modules":[{"name":"AWSLambdaRuntimeCore"}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":")"}],"role":"symbol","roleHeading":"Initializer"},"sections":[],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r"]}],"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"kind":"text","text":": "},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Event"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Output"},{"kind":"text","text":") "},{"text":"where","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Output"},{"text":" : ","kind":"text"},{"preciseIdentifier":"s:SE","text":"Encodable","kind":"typeIdentifier"}]}],"kind":"declarations"},{"parameters":[{"name":"body","content":[{"inlineContent":[{"text":"The handler function written as a closure.","type":"text"}],"type":"paragraph"}]}],"kind":"parameters"}],"references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler":{"kind":"symbol","title":"LambdaHandler","abstract":[{"type":"text","text":"This handler protocol is intended to serve the most common use-cases."},{"type":"text","text":" "},{"type":"text","text":"This protocol is completely agnostic to any encoding\/decoding – decoding the received event invocation into an "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","type":"reference","isActive":true},{"text":" object and encoding the returned ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output","isActive":true,"type":"reference"},{"text":" object is handled by the library.","type":"text"},{"type":"text","text":" "},{"text":"The","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","isActive":true,"type":"reference"},{"type":"text","text":" function simply receives the generic "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","type":"reference","isActive":true},{"type":"text","text":" object as input and returns the generic "},{"isActive":true,"type":"reference","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},{"text":" object.","type":"text"}],"type":"topic","role":"symbol","fragments":[{"kind":"keyword","text":"protocol"},{"text":" ","kind":"text"},{"text":"LambdaHandler","kind":"identifier"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","url":"\/documentation\/awslambdaruntimecore\/lambdahandler","navigatorTitle":[{"text":"LambdaHandler","kind":"identifier"}]},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore":{"url":"\/documentation\/awslambdaruntimecore","type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore","role":"collection","abstract":[{"type":"text","text":"An AWS Lambda runtime for the Swift programming language"}],"kind":"symbol","title":"AWSLambdaRuntimeCore"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-5sz8r":{"title":"init(body:)","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","role":"symbol","type":"topic","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"text":": (","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV","text":"LambdaContext","kind":"typeIdentifier"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"text":"Output","kind":"typeIdentifier"},{"kind":"text","text":")"}],"abstract":[{"text":"Initialize with a closure handler over generic ","type":"text"},{"code":"Input","type":"codeVoice"},{"type":"text","text":" and "},{"code":"Output","type":"codeVoice"},{"text":" types.","type":"text"}],"url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-5sz8r"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"ClosureHandler","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/closurehandler","abstract":[{"type":"text","text":"A "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","type":"reference"},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"type":"text","text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax."}],"role":"symbol","navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"kind":"symbol","title":"ClosureHandler"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaContext":{"title":"LambdaContext","navigatorTitle":[{"text":"LambdaContext","kind":"identifier"}],"type":"topic","kind":"symbol","role":"symbol","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"text":"LambdaContext","kind":"identifier"}],"url":"\/documentation\/awslambdaruntimecore\/lambdacontext","abstract":[{"type":"text","text":"Lambda runtime context."},{"type":"text","text":" "},{"type":"text","text":"The Lambda runtime generates and passes the "},{"code":"LambdaContext","type":"codeVoice"},{"text":" to the Lambda handler as an argument.","type":"text"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext"}}}
0 commit comments