Skip to content

Commit 0a6f963

Browse files
committed
docs: Encoding types
1 parent 4e6eb20 commit 0a6f963

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

crates/primitives/src/reflect/dispatch.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,20 +237,25 @@ pub trait DispatchableConstructorInfo<const ID: u32> {
237237
const LABEL: &'static str;
238238
}
239239

240-
/// todo: comment
240+
/// The ABI encoding/decoding scheme.
241+
#[derive(Debug, Clone, Copy)]
241242
pub enum Encoding {
243+
/// Parity's SCALE codec.
242244
Scale,
245+
/// Solidity ABI encoding.
243246
Solidity,
244247
}
245248

246-
/// Marker type for SCALE encoding. Used with [`AbiEncodeWith`], [`AbiDecodeWith`] and
247-
/// `DecodeMessageResult`.
248-
#[derive(Debug, Default, Clone)]
249+
/// Marker type for SCALE encoding.
250+
///
251+
/// Used with [`AbiEncodeWith`], [`AbiDecodeWith`] and `DecodeMessageResult`.
252+
#[derive(Debug, Default, Clone, Copy)]
249253
pub struct ScaleEncoding;
250254

251-
/// Marker type for Solidity ABI encoding. Used with [`AbiEncodeWith`],
252-
/// [`AbiDecodeWith`] and `DecodeMessageResult`.
253-
#[derive(Debug, Default, Clone)]
255+
/// Marker type for Solidity ABI encoding.
256+
///
257+
/// Used with [`AbiEncodeWith`], [`AbiDecodeWith`] and `DecodeMessageResult`.
258+
#[derive(Debug, Default, Clone, Copy)]
254259
pub struct SolEncoding;
255260

256261
/// Trait for ABI-specific encoding with support for both slice and vector buffers.

0 commit comments

Comments
 (0)