ink_env::types

Trait Clear

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§

const CLEAR_HASH: Self

The clear hash.

Required Methods§

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§

§

impl Clear for [u8; 32]

§

const CLEAR_HASH: [u8; 32] = _

§

fn is_clear(&self) -> bool

Implementors§

§

impl Clear for Hash

§

const CLEAR_HASH: Hash = _