extract
open override fun extract(roots: Iterable<SerialDescriptor>, module: SerializersModule = EmptySerializersModule(), config: SnapshotConfig = SnapshotConfig()): Snapshot
Walks the roots descriptor graphs into a Snapshot.
Parameters
roots
the in-scope @Serializable types' descriptors.
module
resolves open-polymorphic subtypes (from the user's Json).
config
the wire config recorded on the resulting snapshot; also supplies the default polymorphic discriminator key.
fun extract(roots: Iterable<SerialDescriptor>, module: SerializersModule, config: SnapshotConfig, genericRoots: Iterable<SerialDescriptor>): Snapshot
As extract, plus genericRoots — descriptors for root-only generic types resolved with type-parameter holes (#139). They are walked after roots and share the same visited-set, so a generic whose serial name was already reached concretely in roots is skipped (fill-if-absent): the concrete instantiation wins, which avoids both snapshot churn and orphaning the concrete type arguments the primary walk enqueued.