5 questions
7 votes
1 answer
5k views
Skip struct field when deriving Debug [duplicate]
When deriving Debug, what is the best approach to skip a specific struct field that doesn't implement Debug? For example: #[derive(Debug)] pub struct MySettings { pub max_size: usize, pub ...
0 votes
1 answer
126 views
Set up and use the Cats library for typeclass derivation in my Scala 3.4.2 project
Good Day, I am using Intellij 2024.1.3 and Oracle OpenJDK 22.0.1 this is my build.sbt: ThisBuild / version := "0.1.0-SNAPSHOT" ThisBuild / scalaVersion := "3.4.2" lazy val root = (...
0 votes
0 answers
26 views
With a Rust derive proc_macro, can you check if the struct derives another trait? [duplicate]
Say I want to my derive trait Builder. This creates another type FooBuilder. FooBuilder should implement Debug iff Foo also derives Debug. #[derive(Debug, Builder)] struct Foo { bar: String } fn ...
1 vote
1 answer
2k views
Rust `unresolved import` when trying to import an external crate into a module not in the root directory
I'm very new to Rust, so maybe this is an obvious question, but I couldn't find anything that answered it. I can't seem to import the external crate diesel_derive_enum in my module sub-module database/...
-5 votes
1 answer
532 views
Rust derive default on enum to remove need for impl block
~/Workspace/microscaler/docker-api-rs on fix/linting-issues cargo clippy --all-targets --all-features -- -D clippy::all -Z macro-backtrace ...