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
CompilerConfigBuilder #109
Comments
Would like to give this a try! |
Use Option to keep the options in a struct, then put an algorithm in build() based on those values. |
Hi @cwkang1998 :) |
@cwkang1998 are you working on this? |
Yup I am working on this, sorry for the delay, will get the PR up soon |
Sorry for taking a long time, first revision at #138. |
Create a builder patter struct that allows to give some options and will create a compiler config for us. It uses a fluid interface, each method returns a
&mut
ofself
.The interface is this:
config_builder().max_width(10).build()
will return a config with MaxWidthCellManager{max_height, same_height: true}, SimpleStepSelectorBuilderconfig_builder().max_height(1).build()
will return a config with MaxWidthCellManager, SimpleStepSelectorBuilderThings that have no Cell Manager should throw a panic.
Like:
config_builder().max_width(10).max_height(2).build()
The text was updated successfully, but these errors were encountered: