@@ -19,7 +19,7 @@ import NIOCore
19
19
extension LambdaHandler where Event == String {
20
20
/// Implementation of a `ByteBuffer` to `String` decoding.
21
21
@inlinable
22
- public func decode( buffer: ByteBuffer ) throws -> String {
22
+ public func decode( buffer: ByteBuffer ) throws -> Event {
23
23
guard let value = buffer. getString ( at: buffer. readerIndex, length: buffer. readableBytes) else {
24
24
throw CodecError . invalidString
25
25
}
@@ -31,7 +31,7 @@ extension LambdaHandler where Event == String {
31
31
extension LambdaHandler where Output == String {
32
32
/// Implementation of `String` to `ByteBuffer` encoding.
33
33
@inlinable
34
- public func encode( value: String , into buffer: inout ByteBuffer ) throws {
34
+ public func encode( value: Output , into buffer: inout ByteBuffer ) throws {
35
35
buffer. writeString ( value)
36
36
}
37
37
}
@@ -41,7 +41,7 @@ extension LambdaHandler where Output == String {
41
41
extension EventLoopLambdaHandler where Event == String {
42
42
/// Implementation of `String` to `ByteBuffer` encoding.
43
43
@inlinable
44
- public func decode( buffer: ByteBuffer ) throws -> String {
44
+ public func decode( buffer: ByteBuffer ) throws -> Event {
45
45
guard let value = buffer. getString ( at: buffer. readerIndex, length: buffer. readableBytes) else {
46
46
throw CodecError . invalidString
47
47
}
@@ -52,7 +52,7 @@ extension EventLoopLambdaHandler where Event == String {
52
52
extension EventLoopLambdaHandler where Output == String {
53
53
/// Implementation of a `ByteBuffer` to `String` decoding.
54
54
@inlinable
55
- public func encode( value: String , into buffer: inout ByteBuffer ) throws {
55
+ public func encode( value: Output , into buffer: inout ByteBuffer ) throws {
56
56
buffer. writeString ( value)
57
57
}
58
58
}
0 commit comments