@buherator fwiw, I often rely on the compiler to tell me what it expected in places. For things that have trait bounds, it looks at the set of types that could fulfill the requirements and if it is a small list, it will mention them all. It's not perfect, but it works out ok when exploring new APIs.
@buherator I often see people about how rustc yells at them, and I find it more useful to approach it as having a conversation with it. Normally we ask "is this right?" but it can also be "what can go here?" or "who uses this?" (by removing code).
@buherator one of my rule of thumb is that API docs have to have a code snippet showing representative usage, ideally exhaustive. But I'm glad I can rely on the tooling as a last resort if that's not available. This is also a consequence of the prevalent "right by construction" API philosophy that's prevalent in the Rust ecosystem: more complex checks are needed for that that can obscure the requirements.
Another under applied concept is checking not only how nice the API is when used correctly, but also how frustrating it is when used incorrectly (either by making things more opaque, or the diagnostics indecipherable).
@buherator when it comes to tool design, my philosophy could be described as "yes, and" 😄
Not everyone learns or works the same way, so the more approaches are explicitly supported in a sane way, the better.
@buherator I think its had to be prescriptive without looking at the context. I think it is OK to have something that is constructable with fewer restrictions and methods gated on the stronger restriction. But both the docs and the code should make things clear on how to get the more restricted initializer. This smels like the typed builder pattern where methods appear or disappear based on the type/const params.