+{"relationshipsSections":[{"title":"Conforms To","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler"],"kind":"relationships","type":"conformsTo"}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"ClosureHandler"},{"kind":"text","text":"<"},{"kind":"genericParameter","text":"Event"},{"text":", ","kind":"text"},{"kind":"genericParameter","text":"Output"},{"text":"> ","kind":"text"},{"kind":"keyword","text":"where"},{"text":" ","kind":"text"},{"kind":"typeIdentifier","text":"Event"},{"kind":"text","text":" : "},{"preciseIdentifier":"s:Se","text":"Decodable","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"variants":[{"paths":["\/documentation\/awslambdaruntimecore\/closurehandler"],"traits":[{"interfaceLanguage":"swift"}]}],"topicSections":[{"generated":true,"anchor":"Initializers","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-5sz8r","doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg"],"title":"Initializers"},{"generated":true,"title":"Instance Methods","anchor":"Instance-Methods","identifiers":["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)"]}],"abstract":[{"type":"text","text":"A "},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler","isActive":true,"type":"reference"},{"type":"text","text":" conforming handler object that can be constructed with a closure."},{"type":"text","text":" "},{"text":"Allows for a handler to be defined in a clean manner, leveraging Swift’s trailing closure syntax.","type":"text"}],"hierarchy":{"paths":[["doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore"]]},"identifier":{"url":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler","interfaceLanguage":"swift"},"metadata":{"symbolKind":"struct","roleHeading":"Structure","fragments":[{"kind":"keyword","text":"struct"},{"text":" ","kind":"text"},{"text":"ClosureHandler","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"ClosureHandler","kind":"identifier"}],"modules":[{"name":"AWSLambdaRuntimeCore"}],"externalID":"s:20AWSLambdaRuntimeCore14ClosureHandlerV","title":"ClosureHandler"},"sections":[],"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","references":{"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/Output":{"title":"Output","type":"topic","kind":"symbol","required":true,"url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/output","role":"symbol","abstract":[{"text":"Generic output type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"This is the return type of the "},{"isActive":true,"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)","type":"reference"},{"type":"text","text":" function."}],"fragments":[{"kind":"keyword","text":"associatedtype"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Output"},"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/LambdaHandler/Event":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/Event","kind":"symbol","title":"Event","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/event","role":"symbol","fragments":[{"kind":"keyword","text":"associatedtype"},{"kind":"text","text":" "},{"kind":"identifier","text":"Event"},{"kind":"text","text":" : "},{"kind":"typeIdentifier","text":"Decodable","preciseIdentifier":"s:Se"}],"abstract":[{"text":"Generic input type.","type":"text"},{"text":" ","type":"text"},{"type":"text","text":"The body of the request sent to Lambda will be decoded into this type for the handler to consume."}],"required":true,"type":"topic"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/LambdaHandler/handle(_:context:)":{"required":true,"role":"symbol","url":"\/documentation\/awslambdaruntimecore\/lambdahandler\/handle(_:context:)","title":"handle(_:context:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"handle","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP5EventQa","text":"Event"},{"kind":"text","text":", "},{"text":"context","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"text":" -> ","kind":"text"},{"kind":"typeIdentifier","text":"Self"},{"text":".","kind":"text"},{"preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaHandlerP6OutputQa","kind":"typeIdentifier","text":"Output"}],"kind":"symbol","abstract":[{"text":"Implement the business logic of the Lambda function here.","type":"text"}],"type":"topic","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaHandler\/handle(_:context:)"},"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/handle(_:context:)":{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/handle(_:context:)","kind":"symbol","title":"handle(_:context:)","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/handle(_:context:)","role":"symbol","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"handle"},{"text":"(","kind":"text"},{"text":"Event","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"context"},{"text":": ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"kind":"text","text":") "},{"text":"async","kind":"keyword"},{"kind":"text","text":" "},{"text":"throws","kind":"keyword"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Output"}],"abstract":[{"type":"text","text":"Calls the provided "},{"type":"codeVoice","code":"self.body"},{"text":" closure with the generic ","type":"text"},{"type":"codeVoice","code":"Event"},{"text":" object representing the incoming event, and the ","type":"text"},{"identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/LambdaContext","type":"reference","isActive":true}],"type":"topic"},"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"},"doc://AWSLambdaRuntimeCore/documentation/AWSLambdaRuntimeCore/ClosureHandler/init(body:)-9o0yg":{"abstract":[{"text":"Initialize with a closure handler over a generic ","type":"text"},{"code":"Input","type":"codeVoice"},{"type":"text","text":" type, and a "},{"type":"codeVoice","code":"Void"},{"type":"text","text":" "},{"type":"codeVoice","code":"Output"},{"text":".","type":"text"}],"fragments":[{"text":"init","kind":"identifier"},{"kind":"text","text":"("},{"text":"body","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Event","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"LambdaContext","kind":"typeIdentifier","preciseIdentifier":"s:20AWSLambdaRuntimeCore13LambdaContextV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"text":"Void","kind":"typeIdentifier","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"kind":"symbol","title":"init(body:)","url":"\/documentation\/awslambdaruntimecore\/closurehandler\/init(body:)-9o0yg","type":"topic","role":"symbol","identifier":"doc:\/\/AWSLambdaRuntimeCore\/documentation\/AWSLambdaRuntimeCore\/ClosureHandler\/init(body:)-9o0yg"},"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"}}}
0 commit comments