pub struct LogReader<'a> { /* private fields */ }Expand description
Reader for log data from Arrow batches.
Provides efficient access to log fields without copying data from the underlying Arrow columnar format. Each reader is bound to a specific row in the batch.
Implementations§
Source§impl<'a> LogReader<'a>
impl<'a> LogReader<'a>
Sourcepub fn new(batch: &'a RecordBatch, row_idx: usize) -> Result<Self>
pub fn new(batch: &'a RecordBatch, row_idx: usize) -> Result<Self>
Safely create a new reader for the given batch at row index and check that row_idx is within the bounds of the batch.
Sourcepub fn iter(batch: &'a RecordBatch) -> LogIterator<'a>
pub fn iter(batch: &'a RecordBatch) -> LogIterator<'a>
Create an iterator over all rows in the batch.
Sourcepub fn removed(&self) -> Result<Option<bool>, ReadError>
pub fn removed(&self) -> Result<Option<bool>, ReadError>
The boolean value indicating if the event was removed from the blockchain due to a chain reorganization. True if the log was removed. False if it is a valid log.
Sourcepub fn log_index(&self) -> Result<LogIndex, ReadError>
pub fn log_index(&self) -> Result<LogIndex, ReadError>
The integer identifying the index of the event within the block’s list of events.
Sourcepub fn transaction_index(&self) -> Result<TransactionIndex, ReadError>
pub fn transaction_index(&self) -> Result<TransactionIndex, ReadError>
The integer index of the transaction within the block’s list of transactions.
Sourcepub fn transaction_hash(&self) -> Result<Hash, ReadError>
pub fn transaction_hash(&self) -> Result<Hash, ReadError>
The hash of the transaction that triggered the event.
Sourcepub fn block_hash(&self) -> Result<Hash, ReadError>
pub fn block_hash(&self) -> Result<Hash, ReadError>
The hash of the block in which the event was included.
Sourcepub fn block_number(&self) -> Result<BlockNumber, ReadError>
pub fn block_number(&self) -> Result<BlockNumber, ReadError>
The block number in which the event was included.
Sourcepub fn address(&self) -> Result<Address, ReadError>
pub fn address(&self) -> Result<Address, ReadError>
The contract address from which the event originated.
Sourcepub fn topic0(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
pub fn topic0(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
The first topic of the event (topic0).
Sourcepub fn topic1(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
pub fn topic1(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
The second topic of the event (topic1).
Sourcepub fn topic2(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
pub fn topic2(&self) -> Result<Option<FixedSizeData<32>>, ReadError>
The third topic of the event (topic2).
Trait Implementations§
Source§impl<'a> From<ArrowRowReader<'a>> for LogReader<'a>
impl<'a> From<ArrowRowReader<'a>> for LogReader<'a>
Source§fn from(inner: ArrowRowReader<'a>) -> Self
fn from(inner: ArrowRowReader<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for LogReader<'a>
impl<'a> !RefUnwindSafe for LogReader<'a>
impl<'a> Send for LogReader<'a>
impl<'a> Sync for LogReader<'a>
impl<'a> Unpin for LogReader<'a>
impl<'a> !UnwindSafe for LogReader<'a>
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> 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 more