Trait zkgroup::crypto::credentials::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
.
Required Associated Types§
Provided Associated Constants§
Object Safety§
This trait is not object safe.