diff --git a/crates/transcode/src/env_types.rs b/crates/transcode/src/env_types.rs index 853c7a0f5..a923c7851 100644 --- a/crates/transcode/src/env_types.rs +++ b/crates/transcode/src/env_types.rs @@ -134,12 +134,12 @@ impl From<&Path> for PathKey { pub type TypesByPath = HashMap; /// Implement this trait to define custom encoding for a type in a `scale-info` type registry. -pub trait CustomTypeEncoder { +pub trait CustomTypeEncoder: Send + Sync { fn encode_value(&self, value: &Value) -> Result>; } /// Implement this trait to define custom decoding for a type in a `scale-info` type registry. -pub trait CustomTypeDecoder { +pub trait CustomTypeDecoder: Send + Sync { fn decode_value(&self, input: &mut &[u8]) -> Result; }