I’m learning Rust by writing a little CLI application which is split in a library- and application-part. The library is currently returning some struct to the application and I wanted to implement Display within the application.
Unfortunately this is not possible because, for good reason, you are only allowed to implement traits for structs which reside in the current crate. My library and application though are distinct crates (lib.rs and /bin/app.rs).
Now I could implement Display for the struct within the library which of course isn’t a big deal, but I am interested in other best-practices: how can I separate user-facing functionality from the library?