pub struct TreeRoute<Block: BlockT> { /* private fields */ }
Expand description

A tree-route from one block to another in the chain.

All blocks prior to the pivot in the deque is the reverse-order unique ancestry of the first block, the block at the pivot index is the common ancestor, and all blocks after the pivot is the ancestry of the second block, in order.

The ancestry sets will include the given blocks, and thus the tree-route is never empty.

Tree route from R1 to E2. Retracted is [R1, R2, R3], Common is C, enacted [E1, E2]
  <- R3 <- R2 <- R1
 /
C
 \-> E1 -> E2
Tree route from C to E2. Retracted empty. Common is C, enacted [E1, E2]
C -> E1 -> E2

Implementations

Get a slice of all retracted blocks in reverse order (towards common ancestor).

Convert into all retracted blocks in reverse order (towards common ancestor).

Get the common ancestor block. This might be one of the two blocks of the route.

Get a slice of enacted blocks (descendents of the common ancestor)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Convert from a value of T into an equivalent instance of Option<Self>. Read more

Consume self to return Some equivalent value of Option<T>. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Should always be Self

Convert from a value of T into an equivalent instance of Self. Read more

Consume self to return an equivalent value of T. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

Consume self to return an equivalent value of T.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more