maskingSerializer
fun <T> maskingSerializer(delegate: KSerializer<T>, engine: MaskingEngine, registry: Map<String, String>, classDiscriminator: String = "type", serializersModule: SerializersModule = EmptySerializersModule()): KSerializer<T>
Wraps a resource serializer so it masks through engine, recursing via registry.
classDiscriminator is the polymorphic class-discriminator key used to mask sealed @IhawuResource subtypes while preserving the discriminator. It must match the encoding Json's configuration.classDiscriminator (default "type"). Json.configuration.classDiscriminator is a stable (non-experimental) API in kotlinx-serialization 1.8.1, so a call site (e.g. Ktor) can pass it without any opt-in.
serializersModule resolves OPEN (non-sealed abstract/interface) @IhawuResource subtypes (spike #104): pass the encoding Json's serializersModule so registered subtypes can be masked. Defaults to an empty module (sealed masking and non-polymorphic masking need no module).