rumblefrog / a2s-rs

Rust implementation of Source Query
MIT License
20 stars 14 forks source link

Potential API changes #7

Closed CosmicHorrorDev closed 3 years ago

CosmicHorrorDev commented 3 years ago

There's a couple parts of the API that might be able to be simplified.

The first is that A2SClient.app_id is never used for anything useful and should be able to be removed.

The second is that the count stored in Players and Rules is inherently stored in the length of the Vec<Player> and Vec<Rule> respectively. Removing this count allows for Players and Rules to be removed entirely where A2SClient.players() and A2SClient.rules() can return a Vec directly.

Let me know what you think about the possible changes, both of them are minor, but would be breaking changes (although this is pre v1.0 so that is more acceptable).

rumblefrog commented 3 years ago

The app_id is used for opting into reading the ship data.

Ditto on the length field, this was mainly a port from my golang library.