Trait ArrLength

Source
pub trait ArrLength {
    const LEN: usize;
}
Expand description

Selectively exposed types Get the length of constant sized arrays.

use ergo_lib::ArrLength;

type SecretKeyBytes = [u8; 32];

assert_eq!(32, SecretKeyBytes::LEN)

Required Associated Constants§

Source

const LEN: usize

Length of the array

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<T, const LENGTH: usize> ArrLength for [T; LENGTH]

Source§

const LEN: usize = LENGTH

Implementors§