pub enum EnvelopeTxType {
EIP2930,
EIP1559,
EIP4844,
EIP7702,
Frame,
FeeToken,
Privileged,
}Expand description
The EIP-2718 typed-transaction envelope types — the subset of TxType that
can be encoded as a 0x{type} || payload envelope. Excludes TxType::Legacy:
a legacy transaction is a bare RLP list, never a typed envelope. Decoders that
dispatch on the leading type byte match this exhaustively, so there is no
impossible Legacy arm to handle.
Variants§
Implementations§
Source§impl EnvelopeTxType
impl EnvelopeTxType
Sourcepub fn from_type_byte(byte: u8) -> Result<Self, RLPDecodeError>
pub fn from_type_byte(byte: u8) -> Result<Self, RLPDecodeError>
Resolve a typed-transaction envelope type byte (EIP-2718) to its type.
Reuses TxType::from_u8 for the byte mapping (single source of truth) and
TxType::as_envelope to reject non-envelope types. Rejects 0x00: per EIP-2718
a legacy transaction is a bare RLP list, never a 0x00-typed envelope, so
0x00 || rlp(..) is non-canonical and must be rejected (matching go-ethereum) rather
than silently decoded as legacy. Unassigned type bytes are rejected too.
Trait Implementations§
Source§impl Clone for EnvelopeTxType
impl Clone for EnvelopeTxType
impl Copy for EnvelopeTxType
Source§impl Debug for EnvelopeTxType
impl Debug for EnvelopeTxType
impl Eq for EnvelopeTxType
Source§impl PartialEq for EnvelopeTxType
impl PartialEq for EnvelopeTxType
impl StructuralPartialEq for EnvelopeTxType
Auto Trait Implementations§
impl Freeze for EnvelopeTxType
impl RefUnwindSafe for EnvelopeTxType
impl Send for EnvelopeTxType
impl Sync for EnvelopeTxType
impl Unpin for EnvelopeTxType
impl UnsafeUnpin for EnvelopeTxType
impl UnwindSafe for EnvelopeTxType
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.