Trait AttrScalars

Source
pub trait AttrScalars {
    type Storage: ArrayLike<Scalar> + Copy + Eq + Serialize + for<'a> Deserialize<'a>;

    const NUM_ATTRS: usize = <Self::Storage>::LEN;
}
Expand description

Used to specialize a KeyPair<S> to support a certain number of attributes.

The only required member is Storage, which should be a fixed-size array of [Scalar], one for each attribute. However, for backwards compatibility some systems support fewer attributes than are actually stored, and in this case the NUM_ATTRS member can be set to a custom value. Note that NUM_ATTRS must always be less than or equal to the number of elements in Storage.

Provided Associated Constants§

Source

const NUM_ATTRS: usize = <Self::Storage>::LEN

The number of attributes supported in this system.

Defaults to the full set stored in Self::Storage.

Required Associated Types§

Source

type Storage: ArrayLike<Scalar> + Copy + Eq + Serialize + for<'a> Deserialize<'a>

The storage (should be a fixed-size array of Scalar).

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§