pub trait SWMapping<C: SWCurveConfig> {
// Required methods
fn from_sw(sw: SWAffine<C>) -> Self;
fn into_sw(self) -> SWAffine<C>;
fn to_sw_slice(slice: &[Self]) -> Cow<'_, [SWAffine<C>]>
where Self: Sized;
}Expand description
Trait for types that can be converted from/to Short Weierstrass form.
This trait provides methods to convert between a type and its Short Weierstrass representation, both for individual points and slices of points.
Required Methods§
Sourcefn to_sw_slice(slice: &[Self]) -> Cow<'_, [SWAffine<C>]>where
Self: Sized,
fn to_sw_slice(slice: &[Self]) -> Cow<'_, [SWAffine<C>]>where
Self: Sized,
Convert a slice of this type to a slice of Short Weierstrass points.
Returns a borrowed slice if no conversion is needed, or an owned vector if conversion is required.
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.