nextChild
Deprecated (with error)
Use an explicit iterator()
Returns the next child held by this structure. Useful for iterating over its children when parsing complex structures.
Throws
if no more children are available
Migration Examples:
Using decodeRethrowing
:
val result = structure.decodeRethrowing {
val child = next()
// ...
DecodedStructure(...)
}
Content copied to clipboard
Manual iteration:
val iterator = structure.iterator()
while (iterator.hasNext()) {
val child = iterator.next()
// Process child
}
Content copied to clipboard