Skip to content

Use traits to define common methods? #9

@2e0byo

Description

@2e0byo

I'm no kind of experienced rust programmer, but I was surprised that common functionality (available, push, try_push) wasn't factored into traits (maybe QueueStats, LimitedQueue and UnlimitedQueue) to allow easily writing generic functions to e.g. get the current queue stats.

(The actual usecase I had was await_empty which I realise will be fixed when #4 lands.)

If this makes sense and you'd merge the PR I'll try to find time to factor the interface out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions