ink_primitives

Trait Clear

Source
pub trait Clear {
    const CLEAR_HASH: Self;

    // Required method
    fn is_clear(&self) -> bool;
}
Expand description

The equivalent of Zero for hashes.

A hash that consists only of 0 bits is clear.

Required Associated Constants§

Source

const CLEAR_HASH: Self

The clear hash.

Required Methods§

Source

fn is_clear(&self) -> bool

Returns true if the hash is clear.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl Clear for [u8; 32]

Source§

const CLEAR_HASH: Self = _

Source§

fn is_clear(&self) -> bool

Implementors§

Source§

impl Clear for Hash

Source§

const CLEAR_HASH: Self = _