Struct common_types::encoded::Header [−][src]
Owning header view.
Implementations
impl Header
[src]
pub fn new(encoded: Vec<u8>) -> Self
[src]
Create a new owning header view. Expects the data to be an RLP-encoded header – any other case will likely lead to panics further down the line.
pub fn decode(&self) -> Result<FullHeader, DecoderError>
[src]
Upgrade this encoded view to a fully owned Header
object.
pub fn view(&self) -> HeaderView<'_>
[src]
Get a borrowed header view onto the data.
pub fn rlp(&self) -> Rlp<'_>
[src]
Get the rlp of the header.
pub fn into_inner(self) -> Vec<u8>
[src]
Consume the view and return the raw bytes.
impl Header
[src]
pub fn hash(&self) -> H256
[src]
Returns the header hash.
pub fn parent_hash(&self) -> H256
[src]
Returns the parent hash.
pub fn uncles_hash(&self) -> H256
[src]
Returns the uncles hash.
pub fn author(&self) -> Address
[src]
Returns the author.
pub fn state_root(&self) -> H256
[src]
Returns the state root.
pub fn transactions_root(&self) -> H256
[src]
Returns the transaction trie root.
pub fn receipts_root(&self) -> H256
[src]
Returns the receipts trie root
pub fn log_bloom(&self) -> Bloom
[src]
Returns the block log bloom
pub fn difficulty(&self) -> U256
[src]
Difficulty of this block
pub fn number(&self) -> BlockNumber
[src]
Number of this block.
pub fn timestamp(&self) -> u64
[src]
Time this block was produced.
pub fn gas_limit(&self) -> U256
[src]
Gas limit of this block.
pub fn gas_used(&self) -> U256
[src]
Total gas used in this block.
pub fn extra_data(&self) -> Vec<u8>
[src]
Block extra data.
pub fn seal(&self) -> Vec<Vec<u8>>
[src]
Engine-specific seal fields.
Trait Implementations
impl Clone for Header
[src]
impl Debug for Header
[src]
impl Eq for Header
[src]
impl LowerHex for Header
[src]
impl MallocSizeOf for Header
[src]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
[src]
impl PartialEq<Header> for Header
[src]
impl StructuralEq for Header
[src]
impl StructuralPartialEq for Header
[src]
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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> MallocSizeOfExt for T where
T: MallocSizeOf,
[src]
T: MallocSizeOf,
pub fn malloc_size_of(&self) -> usize
[src]
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> MaybeDebug for T where
T: Debug,
T: Debug,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,