referrerpolicy=no-referrer-when-downgrade
polkadot_sdk_frame::traits

Trait Clear

pub trait Clear {
    // Required methods
    fn is_clear(&self) -> bool;
    fn clear() -> Self;
}
Expand description

Trait for things that can be clear (have no bits set). For numeric types, essentially the same as Zero.

Required Methods§

fn is_clear(&self) -> bool

True iff no bits are set.

fn clear() -> Self

Return the value of Self that 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.

Implementors§

§

impl<T> Clear for T
where T: Default + Eq + PartialEq,