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

Add unchecked_builder method to the service builder #1705

Closed
hlbarber opened this issue Sep 5, 2022 · 1 comment
Closed

Add unchecked_builder method to the service builder #1705

hlbarber opened this issue Sep 5, 2022 · 1 comment

Comments

@hlbarber
Copy link
Contributor

hlbarber commented Sep 5, 2022

In #1693 we introduce a {Service}::builder method

impl {Service}<()> {
    pub fn builder() -> {Service}Builder<MissingOperation, ..., MissingOperation> {  ... }
}

Here MissingOperation does not implement the Upgradable trait and so constraints on build will not be met and the customer will receive a compile time error if the field is not set.

In contrast, unchecked_builder should set all the operation generics of {Service}Builder to DummyOperation(?) and implement an Upgradable for it which simply panics.

@hlbarber
Copy link
Contributor Author

hlbarber commented Sep 5, 2022

This helps with the development of #1212 - it would allow us to set only one operation while allowing build.

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

No branches or pull requests

1 participant