BasePow2

Trait BasePow2 

Source
pub trait BasePow2: Base {
    // Required methods
    spec fn bits() -> nat;
    proof fn bits_to_base();
}
Expand description

Represents a base which is a power of 2 specified by Self::bits().

Required Methods§

Source

spec fn bits() -> nat

Source

proof fn bits_to_base()

ensures
Self::bits() > 1,
Self::base() == pow2(Self::bits()),

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 BasePow2 for u8

Source§

open spec fn bits() -> nat

{ 8 }
Source§

proof fn bits_to_base()

Source§

impl BasePow2 for u64

Source§

open spec fn bits() -> nat

{ 64 }
Source§

proof fn bits_to_base()

Source§

impl BasePow2 for usize

Source§

open spec fn bits() -> nat

{ usize::BITS as nat }
Source§

proof fn bits_to_base()

Implementors§