You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0277]: the trait bound `WeightParams: serde::de::Deserialize` is not satisfied
--> shared_messages/src/models/work_order/mod.rs:222:36
|
222 | ...Params = serde_json::from_str(&config_contents)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `serde::de::Deserialize` is not implemented for `WeightParams`
|
= help: the following other types implement trait `serde::de::Deserialize`:
bool
char
isize
i8
i16
i32
i64
usize
and 95 others
note: required by a bound in `serde_json::from_str`
--> /home/scipo/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_json-0.9.10/src/de.rs:1088:14
|
1087 | pub fn from_str<T>(s: &str) -> Result<T>
| -------- required by a bound in this function
1088 | where T: de::Deserialize,
| ^^^^^^^^^^^^^^^ required by this bound in `from_str`
The text was updated successfully, but these errors were encountered:
I tried this code:
I expected to see this happen: The code compiling correctly, and initializing the configuration struct
WeightParams
from the JSON string.Instead, this happened: It says that the trait bound (Deserialize) is not satisfied when it clearly.
Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: