pub struct TraceReader<'a> { /* private fields */ }Expand description
Reader for trace data from Arrow batches.
Provides efficient access to trace 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> TraceReader<'a>
impl<'a> TraceReader<'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) -> TraceIterator<'a>
pub fn iter(batch: &'a RecordBatch) -> TraceIterator<'a>
Create an iterator over all rows in the batch.
Sourcepub fn block_hash(&self) -> Result<Hash, ReadError>
pub fn block_hash(&self) -> Result<Hash, ReadError>
The hash of the block in which this trace occurred.
Sourcepub fn block_number(&self) -> Result<u64, ReadError>
pub fn block_number(&self) -> Result<u64, ReadError>
The number of the block in which this trace occurred.
Sourcepub fn from(&self) -> Result<Option<Address>, ReadError>
pub fn from(&self) -> Result<Option<Address>, ReadError>
The address from which the trace originated.
Sourcepub fn to(&self) -> Result<Option<Address>, ReadError>
pub fn to(&self) -> Result<Option<Address>, ReadError>
The address to which the trace was sent.
Sourcepub fn gas(&self) -> Result<Option<Quantity>, ReadError>
pub fn gas(&self) -> Result<Option<Quantity>, ReadError>
The amount of gas provided to the trace.
Sourcepub fn init(&self) -> Result<Option<Data>, ReadError>
pub fn init(&self) -> Result<Option<Data>, ReadError>
The init data for contract creation traces.
The address of the author (miner).
Sourcepub fn gas_used(&self) -> Result<Option<Quantity>, ReadError>
pub fn gas_used(&self) -> Result<Option<Quantity>, ReadError>
The amount of gas used by the trace.
Sourcepub fn transaction_hash(&self) -> Result<Option<Hash>, ReadError>
pub fn transaction_hash(&self) -> Result<Option<Hash>, ReadError>
The hash of the transaction this trace belongs to.
Trait Implementations§
Source§impl<'a> From<ArrowRowReader<'a>> for TraceReader<'a>
impl<'a> From<ArrowRowReader<'a>> for TraceReader<'a>
Source§fn from(inner: ArrowRowReader<'a>) -> Self
fn from(inner: ArrowRowReader<'a>) -> Self
Auto Trait Implementations§
impl<'a> Freeze for TraceReader<'a>
impl<'a> !RefUnwindSafe for TraceReader<'a>
impl<'a> Send for TraceReader<'a>
impl<'a> Sync for TraceReader<'a>
impl<'a> Unpin for TraceReader<'a>
impl<'a> !UnwindSafe for TraceReader<'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