pub struct LazyEncoded<T: ?Sized> { /* private fields */ }Expand description
Shared cached encoding for an outbound transaction.
This keeps the transaction object and its encoded bytes behind shared references so cloned per-peer messages reuse the same EIP-2718 encoding.
Implementations§
Source§impl LazyEncoded<dyn BroadcastPoolTransaction>
impl LazyEncoded<dyn BroadcastPoolTransaction>
Sourcepub fn new<T>(value: T) -> Selfwhere
T: BroadcastPoolTransaction,
pub fn new<T>(value: T) -> Selfwhere
T: BroadcastPoolTransaction,
Wraps a transaction-like value and lazily caches its encoded bytes.
Trait Implementations§
Source§impl<T: ?Sized> Clone for LazyEncoded<T>
impl<T: ?Sized> Clone for LazyEncoded<T>
Source§impl<T: ?Sized> Debug for LazyEncoded<T>
impl<T: ?Sized> Debug for LazyEncoded<T>
Source§impl<T: Encodable + ?Sized> Encodable for LazyEncoded<T>
impl<T: Encodable + ?Sized> Encodable for LazyEncoded<T>
Source§impl<T: TxHashRef + ?Sized> TxHashRef for LazyEncoded<T>
impl<T: TxHashRef + ?Sized> TxHashRef for LazyEncoded<T>
Source§impl<T: Typed2718 + ?Sized> Typed2718 for LazyEncoded<T>
impl<T: Typed2718 + ?Sized> Typed2718 for LazyEncoded<T>
§fn is_eip2930(&self) -> bool
fn is_eip2930(&self) -> bool
Returns true if the type is an EIP-2930 transaction.
§fn is_eip1559(&self) -> bool
fn is_eip1559(&self) -> bool
Returns true if the type is an EIP-1559 transaction.
§fn is_eip4844(&self) -> bool
fn is_eip4844(&self) -> bool
Returns true if the type is an EIP-4844 transaction.
§fn is_eip7702(&self) -> bool
fn is_eip7702(&self) -> bool
Returns true if the type is an EIP-7702 transaction.
Auto Trait Implementations§
impl<T> Freeze for LazyEncoded<T>
impl<T> RefUnwindSafe for LazyEncoded<T>
impl<T> Send for LazyEncoded<T>
impl<T> Sync for LazyEncoded<T>
impl<T> Unpin for LazyEncoded<T>
impl<T> UnsafeUnpin for LazyEncoded<T>
impl<T> UnwindSafe for LazyEncoded<T>
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
impl<T> BroadcastPoolTransaction for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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 more§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.