Skip to content

Suggestion: multiple Interface trait implementations #29

@leonardoarcari

Description

@leonardoarcari

I've been playing with shaku for weeks now and I do think this is a huge enabler for Hexagonal Architecture in Rust.

The only limitation I came across is the inability to declare multiple Interface implementations for a Component struct. While in Rust would be perfectly possibile for struct FooService to implement the two traits Fizz and Buzz, I'm not able to annotate FooService with something like:

#[derive(Component)]
#[shaku(interfaces = [Fizz, Buzz])]
pub struct FooService{}

impl Fizz for FooService {}

impl Buzz for FooService {}

What do you think about it?

Best regards and keep up the good work! 💪

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