pub enum TypedTransaction {
Legacy(TxLegacy),
Eip2930(TxEip2930),
Eip1559(TxEip1559),
Eip4844(TxEip4844Variant),
}
Expand description
The TypedTransaction enum represents all Ethereum transaction request types.
Its variants correspond to specific allowed transactions:
- Legacy (pre-EIP2718)
TxLegacy
- EIP2930 (state access lists)
TxEip2930
- EIP1559
TxEip1559
- EIP4844
TxEip4844Variant
Variants§
Legacy(TxLegacy)
Legacy transaction
Eip2930(TxEip2930)
EIP-2930 transaction
Eip1559(TxEip1559)
EIP-1559 transaction
Eip4844(TxEip4844Variant)
EIP-4844 transaction
Implementations§
Trait Implementations§
source§impl Clone for TypedTransaction
impl Clone for TypedTransaction
source§fn clone(&self) -> TypedTransaction
fn clone(&self) -> TypedTransaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TypedTransaction
impl Debug for TypedTransaction
source§impl<'de> Deserialize<'de> for TypedTransaction
impl<'de> Deserialize<'de> for TypedTransaction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<TxEip1559> for TypedTransaction
impl From<TxEip1559> for TypedTransaction
source§impl From<TxEip2930> for TypedTransaction
impl From<TxEip2930> for TypedTransaction
source§impl From<TxEip4844> for TypedTransaction
impl From<TxEip4844> for TypedTransaction
source§impl From<TxEip4844Variant> for TypedTransaction
impl From<TxEip4844Variant> for TypedTransaction
source§fn from(tx: TxEip4844Variant) -> Self
fn from(tx: TxEip4844Variant) -> Self
Converts to this type from the input type.
source§impl From<TxEip4844WithSidecar> for TypedTransaction
impl From<TxEip4844WithSidecar> for TypedTransaction
source§fn from(tx: TxEip4844WithSidecar) -> Self
fn from(tx: TxEip4844WithSidecar) -> Self
Converts to this type from the input type.
source§impl From<TxEnvelope> for TypedTransaction
impl From<TxEnvelope> for TypedTransaction
source§fn from(envelope: TxEnvelope) -> Self
fn from(envelope: TxEnvelope) -> Self
Converts to this type from the input type.
source§impl From<TxLegacy> for TypedTransaction
impl From<TxLegacy> for TypedTransaction
source§impl<T: From<TypedTransaction>> From<TypedTransaction> for WithOtherFields<T>
Available on crate feature serde
only.
impl<T: From<TypedTransaction>> From<TypedTransaction> for WithOtherFields<T>
Available on crate feature
serde
only.source§fn from(value: TypedTransaction) -> Self
fn from(value: TypedTransaction) -> Self
Converts to this type from the input type.
source§impl Hash for TypedTransaction
impl Hash for TypedTransaction
source§impl PartialEq for TypedTransaction
impl PartialEq for TypedTransaction
source§fn eq(&self, other: &TypedTransaction) -> bool
fn eq(&self, other: &TypedTransaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TypedTransaction
impl Serialize for TypedTransaction
source§impl Transaction for TypedTransaction
impl Transaction for TypedTransaction
impl Eq for TypedTransaction
impl StructuralPartialEq for TypedTransaction
Auto Trait Implementations§
impl !Freeze for TypedTransaction
impl RefUnwindSafe for TypedTransaction
impl Send for TypedTransaction
impl Sync for TypedTransaction
impl Unpin for TypedTransaction
impl UnwindSafe for TypedTransaction
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreimpl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 304 bytes
Size for each variant:
Legacy
: 144 bytesEip2930
: 160 bytesEip1559
: 176 bytesEip4844
: 304 bytes