MaskingCapability

How a single field may be masked so the output still satisfies the field's declared type contract.

Derived once per type from two serialization-neutral facts about the declared field — textual-or-not and nullable-or-not — which together decide what each strategy may do: REDACT depends on textual-vs-not (a placeholder for text, JSON null for a nullable non-text field, rejected otherwise); HIDE depends only on nullability (see omittable). A serialization backend computes these two facts from its own type system and calls of; nothing here references a serialization library.

Entries

Link copied to clipboard

Textual, non-null. REDACT -> placeholder; HIDE -> reject (omitting a required field breaks the schema).

Link copied to clipboard

Textual, nullable. REDACT -> placeholder; HIDE -> omit.

Link copied to clipboard

Non-textual, nullable. REDACT -> JSON null; HIDE -> omit.

Link copied to clipboard

Non-textual, non-null. No contract-safe masked form exists; both strategies reject.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
expect val name: String
Link copied to clipboard

HIDE: whether this field may be omitted without breaking the declared schema.

Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

The MaskingDecision for a REDACT policy on this field, given its resolved placeholder: the placeholder for a textual field, JSON null for a nullable non-textual field, or a fail-closed MaskingDecision.Omit when no contract-safe value exists.

Link copied to clipboard

Why strategy cannot be honoured on this field, or null if it can. The single predicate shared by the runtime engine and the startup validator, so they agree by construction.

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.