pub struct Scalar(pub [u32; 8]);
Expand description

A 256-bit scalar value.

Tuple Fields

0: [u32; 8]

Implementations

Clear a scalar to prevent the leak of sensitive data.

Set a scalar to an unsigned integer.

Create a scalar from an unsigned integer.

Access bits from a scalar. All requested bits must belong to the same 32-bit limb.

Access bits from a scalar. Not constant time.

Conditionally add a power of two to a scalar. The result is not allowed to overflow.

Set a scalar from a big endian byte array, return whether it overflowed.

Convert a scalar to a byte array.

Convert a scalar to a byte array.

Check whether a scalar equals zero.

Check whether a scalar equals one.

Check whether a scalar is higher than the group order divided by 2.

Conditionally negate a number, in constant time.

Shift a scalar right by some amount strictly between 0 and 16, returning the low bits that were shifted off.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Performs the += operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Executes the destructor for this type. Read more

Performs the conversion.

Formats the value using the given formatter.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

The resulting type after applying the - operator.

Performs the unary - operation. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.