I'm having trouble with importing a struct that is behind a feature flag.
I'm trying to use the Serde unit struct in order to log things that are serde serializable. The problem is, I can't seem to import the Serde struct, even with the nested-values feature enabled.
I get the error
error[E0425]: cannot find function, tuple struct or tuple variant `Serde` in crate `slog`
--> src/main.rs:44:42
|
44 | info!(log, "test"; "output" => slog::Serde(output));
| ^^^^^ not found in `slog`
For more information about this error, try `rustc --explain E0425`.
error: could not compile `slog-serde-example` (bin "slog-serde-example") due to previous error
I'm able to import/see the SerdeValue, which is also behind the nested-values flag, so something else is going on. Additionally, the fact that the struct doesn't show up in the generated docs makes me thinks something is going on in the slog crate.
I'm having trouble with importing a struct that is behind a feature flag.
I'm trying to use the
Serde
unit struct in order to log things that are serde serializable. The problem is, I can't seem to import theSerde
struct, even with thenested-values
feature enabled.I get the error
You can see an example here https://github.com/Paul-E/slog-serde-example
I'm able to import/see the
SerdeValue
, which is also behind thenested-values
flag, so something else is going on. Additionally, the fact that the struct doesn't show up in the generated docs makes me thinks something is going on in the slog crate.