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 a canonically encoded element.
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.