2026-03-23 21:12 UTC
@diondokter
> https://epage.github.io/dev/rust-style/#m-pub-priv
> I generally agree with it. But it is possible for a private type to be more relevant to user understanding than another public type and thus warrants being put above it.
Note that M-CALLER-CALLEE goes before it and calls out: "The weaker the abstraction of the callee, the more immediately after the caller it should be."
I assume that covers your situation?
> https://epage.github.io/dev/rust-style/#m-assoc-trait
> Sometimes a trait impl is more important than seeing the functions. Probably not true for normal trait impls like Clone or Display. Definitely put those last yeah
That guideline provides some important context for it: "Typically, associated functions form the core API for a type and trait implementations augment that API."
Sounds like you are dealing with exception cases. That said, I can only think of a couple of places where I intentionally do not follow this guideline.
Replies (0)
No replies.