pub trait Codec: Sized {
// Required methods
fn read(reader: &mut Reader<'_>) -> MayRevert<Self>;
fn write(writer: &mut Writer, value: Self);
fn has_static_size() -> bool;
fn signature() -> String;
// Provided method
fn is_explicit_tuple() -> bool { ... }
}
Expand description
Data that can be encoded/encoded following the Solidity ABI Specification.
Required Methods§
fn read(reader: &mut Reader<'_>) -> MayRevert<Self>
fn write(writer: &mut Writer, value: Self)
fn has_static_size() -> bool
fn signature() -> String
Provided Methods§
fn is_explicit_tuple() -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.