Struct elliptic_curve_flow::ScalarCore [−][src]
pub struct ScalarCore<C: Curve> { /* fields omitted */ }
arithmetic
only.Expand description
Generic scalar type with core functionality.
This type provides a baseline level of scalar arithmetic functionality which is always available for all curves, regardless of if they implement any arithmetic traits.
Implementations
Generate a random ScalarCore
.
Create a new scalar from Curve::UInt
.
Decode ScalarCore
from big endian bytes.
Decode ScalarCore
from a big endian byte slice.
Decode ScalarCore
from little endian bytes.
Decode ScalarCore
from a little endian byte slice.
Is this ScalarCore
value equal to zero?
Is this ScalarCore
value even?
Is this ScalarCore
value odd?
Encode ScalarCore
as big endian bytes.
Encode ScalarCore
as little endian bytes.
Trait Implementations
Performs the +=
operation. Read more
Performs the +=
operation. Read more
Returns the “default value” for a type. Read more
Performs the conversion.
Performs the conversion.
type Output = ScalarCore<C>
type Output = ScalarCore<C>
The resulting type after applying the -
operator.
Performs the unary -
operation. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Performs the -=
operation. Read more
Performs the -=
operation. Read more
Auto Trait Implementations
impl<C> RefUnwindSafe for ScalarCore<C> where
<C as Curve>::UInt: RefUnwindSafe,
impl<C> Send for ScalarCore<C>
impl<C> Sync for ScalarCore<C>
impl<C> Unpin for ScalarCore<C> where
<C as Curve>::UInt: Unpin,
impl<C> UnwindSafe for ScalarCore<C> where
<C as Curve>::UInt: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
impl<T> ConditionallyNegatable for T where
T: ConditionallySelectable,
&'a T: for<'a> Neg,
<&'a T as Neg>::Output == T,
Negate self
if choice == Choice(1)
; otherwise, leave it
unchanged. Read more