pub struct GLOBAL_CHAIN_TYPE { /* private fields */ }
Expand description

Global chain_type that must be initialized once on node startup. This is accessed via get_chain_type() which allows the global value to be overridden on a per-thread basis (for testing).

Methods from Deref<Target = OneTime<ChainTypes>>

Initializes the OneTime, should only be called once after construction. Will panic (via assert) if called more than once.

Borrows the OneTime, should only be called after initialization. Will panic (via expect) if called before initialization.

Has this OneTime been initialized?

Trait Implementations

The resulting type after dereferencing.

Dereferences the value.

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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self

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.