Skip to content

Provide Traits #3

@28Smiles

Description

@28Smiles

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions