New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend-agnostic connections #346

Closed
flying-sheep opened this Issue May 27, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@flying-sheep

flying-sheep commented May 27, 2016

I’d like to create a impl Connection for PgOrSqliteConnection or at least a Box<Connection> but the former requires me to implement dozens of interfaces and the latter is impossible due to the associated Backend type.

@sgrif

This comment has been minimized.

Member

sgrif commented May 29, 2016

Connections aren't object safe, and basically never will be able to with Rust as it is today. You'll have to write your functions as fn foo<T: Connection>(conn: &T)

@sgrif sgrif closed this May 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment