Trait alloy_eips::eip7685::Encodable7685
source · pub trait Encodable7685: Sized + Send + Sync + 'static {
// Required methods
fn request_type(&self) -> u8;
fn encode_payload_7685(&self, out: &mut dyn BufMut);
// Provided methods
fn encode_7685(&self, out: &mut dyn BufMut) { ... }
fn encoded_7685(&self) -> Vec<u8> ⓘ { ... }
}
Expand description
Encoding trait for EIP-7685 requests. The trait should be implemented for an envelope that wraps each possible request type.
Required Methods§
sourcefn request_type(&self) -> u8
fn request_type(&self) -> u8
Return the request type.
sourcefn encode_payload_7685(&self, out: &mut dyn BufMut)
fn encode_payload_7685(&self, out: &mut dyn BufMut)
Encode the request payload.
The encoding for the payload is request type dependent.
Provided Methods§
sourcefn encode_7685(&self, out: &mut dyn BufMut)
fn encode_7685(&self, out: &mut dyn BufMut)
Encode the request according to EIP-7685 rules.
First a 1-byte flag specifying the request type, then the encoded payload.
The encoding of the payload is request-type dependent.
Object Safety§
This trait is not object safe.