neo4j-labs / neo4rs

Neo4j driver for rust

Home Page:https://docs.rs/neo4rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APIs could be a bit friendlier to users

daveman1010221 opened this issue · comments

Hey, all.

Sorry about the title but that's the clearest way I could think to say it. There are a few areas, such as Query, where it would be nice to either be able to access struct fields as public or have accessor methods for the private fields. I can't really think of a reason the fields would need to be private, as the data belongs to the user of the library anyway.

Also, it would be nice to be able to perform comparison operations on some of the data structs, such as PartialEq. I'm willing to help out in this area. Do you all accept pull requests? Thanks.

Hi @daveman1010221

I agree that Query could expose it's data.
I'd prefer get_* and get_mut_* methods over public fields, as this makes it easier to maintain compatibility in case we need to change some internals later on.

If you still want to, feel free to open a PR.