generic_ec_core::coords

Trait HasAffineXY

Source
pub trait HasAffineXY:
    Curve
    + HasAffineX
    + HasAffineY {
    // Required methods
    fn x_and_y(
        point: &Self::Point,
    ) -> Option<(Self::CoordinateArray, Self::CoordinateArray)>;
    fn from_x_and_y(
        x: &Self::CoordinateArray,
        y: &Self::CoordinateArray,
    ) -> Option<Self::Point>;
}
Expand description

A point that has affine x and y coordinates

Required Methods§

Source

fn x_and_y( point: &Self::Point, ) -> Option<(Self::CoordinateArray, Self::CoordinateArray)>

Returns point affine x and y coordinates

Returns None if it’s point at infinity

Source

fn from_x_and_y( x: &Self::CoordinateArray, y: &Self::CoordinateArray, ) -> Option<Self::Point>

Construct a point from x and y coordinates

Returns None if input does not correspond to a valid point (but you still need to check that the point is on curve and has no small component)

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.

Implementors§