Struct LazyEncoded
pub struct LazyEncoded<T>where
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§
§impl LazyEncoded<dyn BroadcastPoolTransaction>
impl LazyEncoded<dyn BroadcastPoolTransaction>
pub fn new<T>(value: T) -> LazyEncoded<dyn BroadcastPoolTransaction>where
T: BroadcastPoolTransaction,
pub fn new<T>(value: T) -> LazyEncoded<dyn BroadcastPoolTransaction>where
T: BroadcastPoolTransaction,
Wraps a transaction-like value and lazily caches its encoded bytes.
Trait Implementations§
§impl<T> Clone for LazyEncoded<T>where
T: ?Sized,
impl<T> Clone for LazyEncoded<T>where
T: ?Sized,
§fn clone(&self) -> LazyEncoded<T>
fn clone(&self) -> LazyEncoded<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl<T> Debug for LazyEncoded<T>where
T: ?Sized,
impl<T> Debug for LazyEncoded<T>where
T: ?Sized,
§impl<T> Encodable for LazyEncoded<T>where
T: Encodable + ?Sized,
impl<T> Encodable for LazyEncoded<T>where
T: Encodable + ?Sized,
§impl<T> TxHashRef for LazyEncoded<T>where
T: TxHashRef + ?Sized,
impl<T> TxHashRef for LazyEncoded<T>where
T: TxHashRef + ?Sized,
§impl<T> Typed2718 for LazyEncoded<T>where
T: Typed2718 + ?Sized,
impl<T> Typed2718 for LazyEncoded<T>where
T: Typed2718 + ?Sized,
§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.