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
I'm trying to deserialize a String to Secp256k1Scalar, but I am getting the error error[E0277]: the trait bound "Secp256k1Scalar: Deserialize<'_>" is not satisfied, as shown below.
The code is:
let s2:Secp256k1Scalar = serde_json::from_str(&text).unwrap();
How can I deserialize a String to Secp256k1Scalar ?
error[E0277]: the trait bound `Secp256k1Scalar: Deserialize<'_>` is not satisfied
--> server/src/protocol/ecdsa.rs:134:32
|
134 | Some(s) => serde_json::from_str(&s).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^ the trait `Deserialize<'_>` is not implemented for `Secp256k1Scalar`
|
= help: the following other types implement trait `Deserialize<'de>`:
&'a RawStr
&'a UncasedStr
&'a [u8]
&'a rocket::form::name::Key
&'a rocket::form::name::Name
&'a serde_bytes::bytes::Bytes
&'a std::path::Path
&'a str
and 459 others
note: required by a bound in `serde_json::from_str`
--> /home/node/.cargo/registry/src/github.com-1ecc6299db9ec823/serde_json-1.0.99/src/de.rs:2603:8
|
2603 | T: de::Deserialize<'a>,
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `from_str`
The text was updated successfully, but these errors were encountered:
I'm trying to deserialize a
String
toSecp256k1Scalar
, but I am getting the errorerror[E0277]: the trait bound "Secp256k1Scalar: Deserialize<'_>" is not satisfied
, as shown below.The code is:
How can I deserialize a
String
toSecp256k1Scalar
?The text was updated successfully, but these errors were encountered: