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
In candid version 0.9.0 or later, an error occurs in candid_decode_one_allow_trailing when trying to implement AsDynSizeBytes for a dynamic size enum that satisfies StableType, CandidType and Deserialize The following error occurs in candid_decode_one_allow_trailing.
error[E0277]: the trait bound `Details: candid::types::CandidType` is not satisfied --> src/backend/src/something.rs:14:47 |14 | #[derive(StableType, CandidType, Deserialize, CandidAsDynSizeBytes)] | ^^^^^^^^^^^^^^^^^^^^ the trait `candid::types::CandidType` is not implemented for `Details` | = help: the following other types implement trait `candid::types::CandidType`: bool isize i8 i16 i32 i64 i128 usize and 131 othersnote: required by a bound in `candid_decode_one_allow_trailing` --> /Users/me/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ic-stable-memory-0.4.4/./src/encoding/dyn_size.rs:118:26 |116 | pub fn candid_decode_one_allow_trailing<'a, T>(bytes: &'a [u8]) -> Result<T> | -------------------------------- required by a bound in this function117 | where118 | T: Deserialize<'a> + CandidType, | ^^^^^^^^^^ required by this bound in `candid_decode_one_allow_trailing` = note: this error originates in the derive macro `CandidAsDynSizeBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
The same error occurred when I manually implemented AsDynSizeBytes.
This does not happen with candid 0.8.4.
The text was updated successfully, but these errors were encountered:
Hello @seniorjoinu.
In candid version 0.9.0 or later, an error occurs in candid_decode_one_allow_trailing when trying to implement AsDynSizeBytes for a dynamic size enum that satisfies StableType, CandidType and Deserialize The following error occurs in candid_decode_one_allow_trailing.
then,
The same error occurred when I manually implemented AsDynSizeBytes.
This does not happen with candid 0.8.4.
The text was updated successfully, but these errors were encountered: