DataPreprocessor
public protocol DataPreprocessor : Sendable
Type used to preprocess Data
before it handled by a serializer.
-
Process
Data
before it’s handled by a serializer.Declaration
Swift
func preprocess(_ data: Data) throws -> Data
Parameters
data
The raw
Data
to process.
-
passthrough
Extension methodProvides a
PassthroughPreprocessor
instance.Declaration
Swift
public static var passthrough: PassthroughPreprocessor { get }
-
googleXSSI
Extension methodProvides a
GoogleXSSIPreprocessor
instance.Declaration
Swift
public static var googleXSSI: GoogleXSSIPreprocessor { get }