Skip to content

Adding a generic connection trait to tokio-postgres #537

Closed
@nolanderc

Description

@nolanderc

PR #525 adds a synchronous trait into rust-postgres for synchronous connections, I believe adding a corresponding trait into tokio-postgres would be benefitial. However, since async methods are not yet supported in traits we have to work around it using dynamic dispatch, such as is made possible by https://github.com/dtolnay/async-trait.

I have implemented a limited version in my own project, and would be happy to add a more full-featured version into the main library, if you'd be fine with such a workaround.

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