Struct common_types::views::HeaderView [−][src]
View onto block header rlp.
Implementations
impl<'a> HeaderView<'a>
[src]
pub fn new(rlp: ViewRlp<'a>) -> HeaderView<'a>
[src]
Creates a new Header view from valid ViewRlp
Use the view!
macro to create this view in order to capture debugging info.
Example
#[macro_use] extern crate common_types as types; use types::views::{HeaderView}; fn main() { let bytes : &[u8] = &[]; let tx_view = view!(HeaderView, bytes); }
pub fn hash(&self) -> H256
[src]
Returns header hash.
pub fn rlp(&self) -> &ViewRlp<'a>
[src]
Returns raw rlp.
pub fn parent_hash(&self) -> H256
[src]
Returns parent hash.
pub fn uncles_hash(&self) -> H256
[src]
Returns uncles hash.
pub fn author(&self) -> Address
[src]
Returns author.
pub fn state_root(&self) -> H256
[src]
Returns state root.
pub fn transactions_root(&self) -> H256
[src]
Returns transactions root.
pub fn receipts_root(&self) -> H256
[src]
Returns block receipts root.
pub fn log_bloom(&self) -> Bloom
[src]
Returns block log bloom.
pub fn difficulty(&self) -> U256
[src]
Returns block difficulty.
pub fn number(&self) -> BlockNumber
[src]
Returns block number.
pub fn gas_limit(&self) -> U256
[src]
Returns block gas limit.
pub fn gas_used(&self) -> U256
[src]
Returns block gas used.
pub fn timestamp(&self) -> u64
[src]
Returns timestamp.
pub fn extra_data(&self) -> Bytes
[src]
Returns block extra data.
pub fn seal(&self) -> Vec<Bytes>
[src]
Returns a vector of post-RLP-encoded seal fields.
pub fn decode_seal(&self) -> Result<Vec<Bytes>, DecoderError>
[src]
Returns a vector of seal fields (RLP-decoded).
Auto Trait Implementations
impl<'a> !RefUnwindSafe for HeaderView<'a>
impl<'a> Send for HeaderView<'a>
impl<'a> !Sync for HeaderView<'a>
impl<'a> Unpin for HeaderView<'a>
impl<'a> UnwindSafe for HeaderView<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,