Skip to main content

BlockContext

Struct BlockContext 

Source
pub struct BlockContext<'a, F: HeaderFamily> {
    pub block: &'a F::Block,
    pub height: u32,
    pub spending: &'a Spending,
    pub mtp: Option<u32>,
    pub records: &'a Records,
}
Expand description

What a block-context rule sees.

Fields§

§block: &'a F::Block

The block.

§height: u32

Its height.

§spending: &'a Spending

The resolved spending.

§mtp: Option<u32>

Median time past of the previous 11 headers, when known.

§records: &'a Records

The overlay’s records before this block.

Trait Implementations§

Source§

impl<'a, F: Debug + HeaderFamily> Debug for BlockContext<'a, F>
where F::Block: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, F> Freeze for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: Freeze,

§

impl<'a, F> RefUnwindSafe for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: RefUnwindSafe,

§

impl<'a, F> Send for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: Send,

§

impl<'a, F> Sync for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: Sync,

§

impl<'a, F> Unpin for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: Unpin,

§

impl<'a, F> UnsafeUnpin for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: UnsafeUnpin,

§

impl<'a, F> UnwindSafe for BlockContext<'a, F>
where &'a <F as HeaderFamily>::Block: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.