pub trait Element:
Clone
+ Eq
+ PartialEq
+ Send
+ Sync {
// Required methods
fn zero() -> Self;
fn one() -> Self;
fn add(&mut self, rhs: &Self);
fn mul(&mut self, rhs: &Scalar);
fn serialize(&self) -> Vec<u8> ⓘ;
fn size() -> usize;
fn deserialize(bytes: &[u8]) -> Option<Self>;
}Expand description
An element of a group.
Required Methods§
Sourcefn deserialize(bytes: &[u8]) -> Option<Self>
fn deserialize(bytes: &[u8]) -> Option<Self>
Deserializes an untrusted, canonically-encoded element.
This function performs any validation necessary to ensure the decoded element is valid (like an infinity or group check).
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.