pub enum SWFlags {
YIsPositive = 0,
PointAtInfinity = 64,
YIsNegative = 128,
}
Expand description
Flags to be encoded into the serialization. The default flags (empty) should not change the binary representation.
Variants§
YIsPositive = 0
Represents a point with positive y-coordinate by setting all bits to 0.
PointAtInfinity = 64
Represents the point at infinity by setting the setting the last-but-one bit to 1.
YIsNegative = 128
Represents a point with negative y-coordinate by setting the MSB to 1.
Implementations§
Source§impl SWFlags
impl SWFlags
pub fn infinity() -> Self
pub fn from_y_coordinate(y: impl Field) -> Self
pub fn is_infinity(&self) -> bool
pub fn is_positive(&self) -> Option<bool>
Trait Implementations§
impl Copy for SWFlags
impl Eq for SWFlags
impl StructuralPartialEq for SWFlags
Auto Trait Implementations§
impl Freeze for SWFlags
impl RefUnwindSafe for SWFlags
impl Send for SWFlags
impl Sync for SWFlags
impl Unpin for SWFlags
impl UnwindSafe for SWFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more