Veetaha's amendments for #[builder(getter)]
#226
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Followup for #222
Did the following changes:
typosto pre-commit hook andinit.shas well. Updatedtyposversion, fixed some new typos.#![no_std]compatible#[builder(getter, default)]attributes combotrybuildtests to make sure methods aren't accessible until values are set, and mutual exclusion checks work#[must_use]to getters. Added a negative test towarnings.rstest case to make sure it works.validate_mutually_exclusive. All other attributes such asfinish_fn,start_fn,skipalready have their ownvalidate_mutually_alllowedblocks, so they already rejectgetterwith them.getter.rstogetters.rs, because I expect it will be possible to generate multiple getters in the future.let-elsewith an explicitlet-match).Getterspage to the Typestate API guide section#[builder(getter)]reference page. Added examples of how it works for optional members. Removed some redundancies and copy-paste mistakes.builder.mdnightlyand they are almost always green there. The only breakage from the version update may happen intrybuildtests, which would only require updating thetrybuildtest snapshots withTRYBUILD=overwrite cargo t --all-features