Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stdlib] Add _forEachField(of:options:body:) function #29042

Closed
wants to merge 2 commits into from

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Jan 7, 2020

This function walks all the fields of a struct, class, or tuple type, and calls body with the name, offset, and type of each field. body can perform any required work or validation, returning true to continue walking fields or false to stop immediately.

This function walks all the fields of a struct, class, or tuple, and calls
`body` with the name, offset, and type of each field. `body` can perform
any required work or validation, returning `true` to continue walking fields
or `false` to stop immediately.
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000 natecook1000 changed the title Add forEachField(of:options:body:) to SwiftPrivate module [stdlib] Add _forEachField(of:options:body:) function Jan 7, 2020
@natecook1000
Copy link
Member Author

@swift-ci Please smoke test

@natecook1000
Copy link
Member Author

@swift-ci Please smoke test


/// Options for calling `_forEachField(of:options:body:)`.
public // SPI(Foundation)
struct _EachFieldOptions: OptionSet {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need an availability annotation?

@natecook1000
Copy link
Member Author

Still looking at exactly how this function should land. Closing for now…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants