Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require env_type transcoders to be Send + Sync #879

Merged
merged 3 commits into from
Jan 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/transcode/src/env_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ impl From<&Path<PortableForm>> for PathKey {
pub type TypesByPath = HashMap<PathKey, u32>;

/// 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<Vec<u8>>;
}

/// 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<Value>;
}

Expand Down