-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Labels
breakingProposed change that would break the public APIProposed change that would break the public API
Description
Clarifying example: source_instance.speed(1.5) wraps whatever source instance its called on in a Speed struct (which is itself again a Source). The Speed struct can also be constructed by using speed::speed::new(source_instance, 1.5)
The latter is clearly not meant to be used as the docs for such factories are often along the line of:
Line 7 in 95a466e
| /// Internal function that builds a `Speed` object. |
This specific example was made before pub(crate) existed (yeah rodio is 9 years old and still improving 🥳 ) see: https://releases.rs/docs/1.30.0/.
I propose that a source's factories are made private to the crate (pub(crate)) when the Source wraps an inner source.
This:
- steers users in how to use Rodio
- reduces the API surface, easing maintenance
- removes the need for documentation
When implementing care should be taken to copy/merge the documentation to/with that on Source::.
Metadata
Metadata
Assignees
Labels
breakingProposed change that would break the public APIProposed change that would break the public API