In order to use (avoid duplicate ::builder() impls) and reason on a typelevel with this, it would be nice to have some sort of trait system. My proposal would be:
trait ConstBuilder {
type Builder: ConstBuilderImpl;
fn builder() -> Self::Builder;
}
/// Marker Trait
trait ConstBuilderImpl {
type Output;
}
/// Trait implemented by Builder<true, true, true, ...>
trait ConstBuilderBuild {
type Output;
fn build(self) -> Self::Output;
}
Or something simmilar, if you are not interested in implementing it yourself, i would offer to do it.
NOTE: This would need restructure of the project and moving the proc-macro to a seperate crate.
In order to use (avoid duplicate ::builder() impls) and reason on a typelevel with this, it would be nice to have some sort of trait system. My proposal would be:
trait ConstBuilder {
type Builder: ConstBuilderImpl;
fn builder() -> Self::Builder;
}
/// Marker Trait
trait ConstBuilderImpl {
type Output;
}
/// Trait implemented by Builder<true, true, true, ...>
trait ConstBuilderBuild {
type Output;
fn build(self) -> Self::Output;
}
Or something simmilar, if you are not interested in implementing it yourself, i would offer to do it.
NOTE: This would need restructure of the project and moving the proc-macro to a seperate crate.