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§
Required Associated Types§
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.