pub struct CoreBlock {Show 16 fields
pub number: Option<U64>,
pub hash: Option<B256>,
pub parent_hash: B256,
pub mix_digest: Option<B256>,
pub uncle_hash: B256,
pub receipt_hash: B256,
pub root: B256,
pub tx_hash: B256,
pub coinbase: Address,
pub nonce: Option<B64>,
pub gas_used: U256,
pub gas_limit: U256,
pub difficulty: U256,
pub extra: Bytes,
pub bloom: Option<Bytes>,
pub time: U256,
}Fields§
§number: Option<U64>§hash: Option<B256>§parent_hash: B256§mix_digest: Option<B256>§uncle_hash: B256§receipt_hash: B256§root: B256§tx_hash: B256§coinbase: Address§nonce: Option<B64>§gas_used: U256§gas_limit: U256§difficulty: U256§extra: Bytes§bloom: Option<Bytes>§time: U256Implementations§
Source§impl CoreBlock
impl CoreBlock
pub fn number(&self) -> Option<U64>
pub fn hash(&self) -> Option<B256>
pub fn parent_hash(&self) -> B256
pub fn mix_digest(&self) -> Option<B256>
pub fn uncle_hash(&self) -> B256
pub fn receipt_hash(&self) -> B256
pub fn root(&self) -> B256
pub fn tx_hash(&self) -> B256
pub fn coinbase(&self) -> Address
pub fn nonce(&self) -> Option<B64>
pub fn gas_used(&self) -> U256
pub fn gas_limit(&self) -> U256
pub fn difficulty(&self) -> U256
pub fn extra(&self) -> Bytes
pub fn bloom(&self) -> Option<Bytes>
pub fn time(&self) -> U256
pub async fn insert( &self, pool: &PgPool, network: NetworkKind, ) -> Result<(), SqlError>
pub async fn emit( &self, queue: &Client, network: &NetworkKind, ) -> Result<(), PropagateError>
pub async fn stream( &self, queue: &Client, network: &NetworkKind, ) -> Result<(), PropagateError>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CoreBlock
impl<'de> Deserialize<'de> for CoreBlock
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, R: Row> FromRow<'a, R> for CoreBlockwhere
&'a str: ColumnIndex<R>,
Option<U64>: Decode<'a, R::Database> + Type<R::Database>,
Option<B256>: Decode<'a, R::Database> + Type<R::Database>,
B256: Decode<'a, R::Database> + Type<R::Database>,
Address: Decode<'a, R::Database> + Type<R::Database>,
Option<B64>: Decode<'a, R::Database> + Type<R::Database>,
U256: Decode<'a, R::Database> + Type<R::Database>,
Bytes: Decode<'a, R::Database> + Type<R::Database>,
Option<Bytes>: Decode<'a, R::Database> + Type<R::Database>,
impl<'a, R: Row> FromRow<'a, R> for CoreBlockwhere
&'a str: ColumnIndex<R>,
Option<U64>: Decode<'a, R::Database> + Type<R::Database>,
Option<B256>: Decode<'a, R::Database> + Type<R::Database>,
B256: Decode<'a, R::Database> + Type<R::Database>,
Address: Decode<'a, R::Database> + Type<R::Database>,
Option<B64>: Decode<'a, R::Database> + Type<R::Database>,
U256: Decode<'a, R::Database> + Type<R::Database>,
Bytes: Decode<'a, R::Database> + Type<R::Database>,
Option<Bytes>: Decode<'a, R::Database> + Type<R::Database>,
Source§impl<'__s> ToSchema<'__s> for CoreBlock
impl<'__s> ToSchema<'__s> for CoreBlock
impl Eq for CoreBlock
impl StructuralPartialEq for CoreBlock
Auto Trait Implementations§
impl !Freeze for CoreBlock
impl RefUnwindSafe for CoreBlock
impl Send for CoreBlock
impl Sync for CoreBlock
impl Unpin for CoreBlock
impl UnwindSafe for CoreBlock
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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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