tonic
tonic copied to clipboard
feat(transport): Unify API for setting service to be via Routes instance
Motivation
Reduces transport layer's responsibility and makes easier to maintain it.
Solution
[!warning] This proposal contains breaking changes.
Unifies API for setting services to be via Routes instance. This pull request removes add_service, add_optional_service API from Server and Router, and refactor Routes and RoutesBuilder allowed by this change. As these APIs seem to increase the complexity rather than the benefit it provides, they could be removed for the purpose of improving the maintainability.