Right now, the public interface of Logger takes in messages of a type variable T. There's no other reference in the documentation for what this type is, or what kind of things are LogFormat (I assume Formatter3164 and Formatter5424 are, but there is no hint or information from the documentation which indicates this).
Could we possibly have the LogFormat trait be public, or at least make some sub-trait of it public?
If the goal of having it private is to prevent breaking changes, then it could be changed to a pair of traits like:
// public trait, exported to crate root
pub trait LogFormat<T>: intentionally_private::LogFormat { }
mod intentionally_private {
pub LogFormat {
// actual methods here
}
}
// all formatters implementing LogFormat implement both traits, so the public trait will show up in the documentation.
// anything requiring LogFormat publicly requires the outer `LogFormat`, not `intentionally_private::LogFormat`
Right now, the public interface of
Logger
takes in messages of a type variableT
. There's no other reference in the documentation for what this type is, or what kind of things areLogFormat
(I assumeFormatter3164
andFormatter5424
are, but there is no hint or information from the documentation which indicates this).Could we possibly have the
LogFormat
trait be public, or at least make some sub-trait of it public?If the goal of having it private is to prevent breaking changes, then it could be changed to a pair of traits like: