Skip to content

Use a tri-state for InformationObjectClassField optionality#128

Merged
6d7a merged 1 commit intolibrasn:mainfrom
Rawk:class-field-optionality
Jun 30, 2025
Merged

Use a tri-state for InformationObjectClassField optionality#128
6d7a merged 1 commit intolibrasn:mainfrom
Rawk:class-field-optionality

Conversation

@Rawk
Copy link
Copy Markdown
Contributor

@Rawk Rawk commented Jun 29, 2025

Information object class fields can be either OPTIONAL, DEFAULT or required. Model it with an enum of these three states.

This makes the invalid state where is_optional == true and default is Some(..) unrepresentable.

This also makes the default value generic, which will be required to parse different types of default values in the future.

Information object class fields can be either OPTIONAL, DEFAULT or
required. Model it with an enum of these three states.

This makes the invalid state where `is_optional == true` and
`default` is `Some(..)` unrepresentable.

This also makes the default value generic, which will be required to
parse different types of default values in the future.
@Rawk Rawk force-pushed the class-field-optionality branch from 4d14fec to 08f460d Compare June 29, 2025 10:19
Copy link
Copy Markdown
Member

@6d7a 6d7a left a comment

Choose a reason for hiding this comment

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

LGTM

@6d7a 6d7a merged commit d718894 into librasn:main Jun 30, 2025
1 check passed
@Rawk Rawk deleted the class-field-optionality branch June 30, 2025 15:49
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.

2 participants