pub struct CalldataSource<CP>where
CP: ChainProvider + Send,{
pub chain_provider: CP,
pub batch_inbox_address: Address,
pub signer: Address,
pub calldata: VecDeque<Bytes>,
pub open: bool,
}
Expand description
A data iterator that reads from calldata.
Fields§
§chain_provider: CP
The chain provider to use for the calldata source.
batch_inbox_address: Address
The batch inbox address.
signer: Address
The L1 Signer.
calldata: VecDeque<Bytes>
Current calldata.
open: bool
Whether the calldata source is open.
Implementations§
Source§impl<CP> CalldataSource<CP>where
CP: ChainProvider + Send,
impl<CP> CalldataSource<CP>where
CP: ChainProvider + Send,
Sourcepub const fn new(
chain_provider: CP,
batch_inbox_address: Address,
signer: Address,
) -> CalldataSource<CP>
pub const fn new( chain_provider: CP, batch_inbox_address: Address, signer: Address, ) -> CalldataSource<CP>
Creates a new calldata source.
Trait Implementations§
Source§impl<CP> Clone for CalldataSource<CP>
impl<CP> Clone for CalldataSource<CP>
Source§fn clone(&self) -> CalldataSource<CP>
fn clone(&self) -> CalldataSource<CP>
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<CP> DataAvailabilityProvider for CalldataSource<CP>where
CP: ChainProvider + Send,
impl<CP> DataAvailabilityProvider for CalldataSource<CP>where
CP: ChainProvider + Send,
Source§fn next<'life0, 'life1, 'async_trait>(
&'life0 mut self,
block_ref: &'life1 BlockInfo,
) -> Pin<Box<dyn Future<Output = Result<<CalldataSource<CP> as DataAvailabilityProvider>::Item, PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CalldataSource<CP>: 'async_trait,
fn next<'life0, 'life1, 'async_trait>(
&'life0 mut self,
block_ref: &'life1 BlockInfo,
) -> Pin<Box<dyn Future<Output = Result<<CalldataSource<CP> as DataAvailabilityProvider>::Item, PipelineErrorKind>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
CalldataSource<CP>: 'async_trait,
Returns the next data for the given BlockInfo.
Returns a
PipelineError::Eof
if there is no more data for the given block ref.Auto Trait Implementations§
impl<CP> Freeze for CalldataSource<CP>where
CP: Freeze,
impl<CP> RefUnwindSafe for CalldataSource<CP>where
CP: RefUnwindSafe,
impl<CP> Send for CalldataSource<CP>
impl<CP> Sync for CalldataSource<CP>where
CP: Sync,
impl<CP> Unpin for CalldataSource<CP>where
CP: Unpin,
impl<CP> UnwindSafe for CalldataSource<CP>where
CP: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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>
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