#[repr(u8)]pub enum TxType {
Legacy = 0,
Eip2930 = 1,
Eip1559 = 2,
Eip4844 = 3,
Eip7702 = 4,
}
Expand description
Transaction types supported by EthereumTxEnvelope
.
Variants§
Legacy = 0
Transaction type of Signed < TxLegacy >
.
Eip2930 = 1
Transaction type of Signed < TxEip2930 >
.
Eip1559 = 2
Transaction type of Signed < TxEip1559 >
.
Eip4844 = 3
Transaction type of Signed < Eip4844 >
.
Eip7702 = 4
Transaction type of Signed < TxEip7702 >
.
Implementations§
Source§impl TxType
impl TxType
Sourcepub const fn is_eip2930(&self) -> bool
pub const fn is_eip2930(&self) -> bool
Returns true if the transaction type is EIP-2930.
Sourcepub const fn is_eip1559(&self) -> bool
pub const fn is_eip1559(&self) -> bool
Returns true if the transaction type is EIP-1559.
Sourcepub const fn is_eip4844(&self) -> bool
pub const fn is_eip4844(&self) -> bool
Returns true if the transaction type is EIP-4844.
Sourcepub const fn is_eip7702(&self) -> bool
pub const fn is_eip7702(&self) -> bool
Returns true if the transaction type is EIP-7702.
Sourcepub const fn is_dynamic_fee(&self) -> bool
pub const fn is_dynamic_fee(&self) -> bool
Returns true if the transaction type has dynamic fee.
Trait Implementations§
Source§impl Arbitrary<'_> for TxType
Available on crate feature arbitrary
only.
impl Arbitrary<'_> for TxType
arbitrary
only.Source§fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self>
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Unstructured
this type
needs to construct itself. Read moreSource§impl<'de> Deserialize<'de> for TxType
impl<'de> Deserialize<'de> for TxType
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>,
Source§impl IsTyped2718 for TxType
impl IsTyped2718 for TxType
Source§impl Ord for TxType
impl Ord for TxType
Source§impl PartialOrd for TxType
impl PartialOrd for TxType
Source§impl Typed2718 for TxType
impl Typed2718 for TxType
Source§fn is_eip2930(&self) -> bool
fn is_eip2930(&self) -> bool
Source§fn is_eip1559(&self) -> bool
fn is_eip1559(&self) -> bool
Source§fn is_eip4844(&self) -> bool
fn is_eip4844(&self) -> bool
Source§fn is_eip7702(&self) -> bool
fn is_eip7702(&self) -> bool
impl Copy for TxType
impl Eq for TxType
impl StructuralPartialEq for TxType
Auto Trait Implementations§
impl Freeze for TxType
impl RefUnwindSafe for TxType
impl Send for TxType
impl Sync for TxType
impl Unpin for TxType
impl UnwindSafe for TxType
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
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<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> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<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: 1 byte
Size for each variant:
Legacy
: 0 bytesEip2930
: 0 bytesEip1559
: 0 bytesEip4844
: 0 bytesEip7702
: 0 bytes