Struct grin_core::global::GLOBAL_CHAIN_TYPE
source · [−]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>>
sourcepub fn init(&self, value: T)
pub fn init(&self, value: T)
Initializes the OneTime, should only be called once after construction. Will panic (via assert) if called more than once.
Trait Implementations
sourceimpl Deref for GLOBAL_CHAIN_TYPE
impl Deref for GLOBAL_CHAIN_TYPE
type Target = OneTime<ChainTypes>
type Target = OneTime<ChainTypes>
The resulting type after dereferencing.
sourcefn deref(&self) -> &OneTime<ChainTypes>
fn deref(&self) -> &OneTime<ChainTypes>
Dereferences the value.
impl LazyStatic for GLOBAL_CHAIN_TYPE
Auto Trait Implementations
impl RefUnwindSafe for GLOBAL_CHAIN_TYPE
impl Send for GLOBAL_CHAIN_TYPE
impl Sync for GLOBAL_CHAIN_TYPE
impl Unpin for GLOBAL_CHAIN_TYPE
impl UnwindSafe for GLOBAL_CHAIN_TYPE
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more