pub enum Coordinates<'a, C: Curve> {
Identity,
Compact {
x: &'a FieldBytes<C>,
},
Compressed {
x: &'a FieldBytes<C>,
y_is_odd: bool,
},
Uncompressed {
x: &'a FieldBytes<C>,
y: &'a FieldBytes<C>,
},
}Expand description
Enum representing the coordinates of either compressed or uncompressed SEC1-encoded elliptic curve points.
Variants§
Identity
Identity point (a.k.a. point at infinity)
Compact
Compact curve point
Fields
§
x: &'a FieldBytes<C>x-coordinate
Compressed
Compressed curve point
Uncompressed
Uncompressed curve point
Implementations§
Source§impl<'a, C: Curve> Coordinates<'a, C>
impl<'a, C: Curve> Coordinates<'a, C>
Sourcepub fn tag(&self) -> Tag
pub fn tag(&self) -> Tag
Get the tag octet needed to encode this set of Coordinates
Trait Implementations§
impl<'a, C: Copy + Curve> Copy for Coordinates<'a, C>
impl<'a, C: Eq + Curve> Eq for Coordinates<'a, C>
impl<'a, C: PartialEq + Curve> StructuralPartialEq for Coordinates<'a, C>
Auto Trait Implementations§
impl<'a, C> Freeze for Coordinates<'a, C>
impl<'a, C> RefUnwindSafe for Coordinates<'a, C>where
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
impl<'a, C> Send for Coordinates<'a, C>
impl<'a, C> Sync for Coordinates<'a, C>
impl<'a, C> Unpin for Coordinates<'a, C>
impl<'a, C> UnsafeUnpin for Coordinates<'a, C>
impl<'a, C> UnwindSafe for Coordinates<'a, C>where
<<<C as Curve>::UInt as ArrayEncoding>::ByteSize as ArrayLength<u8>>::ArrayType: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more