Struct cryptid::Scalar[][src]

pub struct Scalar(_);

Implementations

impl Scalar[src]

pub fn random<R: Rng + CryptoRng>(rng: &mut R) -> Self[src]

pub fn zero() -> Self[src]

pub fn one() -> Self[src]

pub fn as_bytes(&self) -> &[u8; 32][src]

pub fn to_bytes(self) -> [u8; 32][src]

Trait Implementations

impl Add<Scalar> for Scalar[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, rhs: Scalar) -> Self::Output[src]

Performs the + operation. Read more

impl AsBase64 for Scalar[src]

type Error = CryptoError

fn as_base64(&self) -> String[src]

fn try_from_base64(encoded: &str) -> Result<Self, Self::Error>[src]

impl Clone for Scalar[src]

fn clone(&self) -> Scalar[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Scalar[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'de> Deserialize<'de> for Scalar[src]

fn deserialize<D>(
    deserializer: D
) -> Result<Self, <D as Deserializer<'de>>::Error> where
    D: Deserializer<'de>, 
[src]

Deserialize this value from the given Serde deserializer. Read more

impl From<[u8; 32]> for Scalar[src]

fn from(bytes: [u8; 32]) -> Self[src]

Performs the conversion.

impl From<[u8; 64]> for Scalar[src]

fn from(bytes: [u8; 64]) -> Self[src]

Performs the conversion.

impl From<BigUint> for Scalar[src]

fn from(s: BigUint) -> Self[src]

Performs the conversion.

impl From<u128> for Scalar[src]

fn from(n: u128) -> Self[src]

Performs the conversion.

impl From<u16> for Scalar[src]

fn from(n: u16) -> Self[src]

Performs the conversion.

impl From<u32> for Scalar[src]

fn from(n: u32) -> Self[src]

Performs the conversion.

impl From<u64> for Scalar[src]

fn from(n: u64) -> Self[src]

Performs the conversion.

impl From<u8> for Scalar[src]

fn from(n: u8) -> Self[src]

Performs the conversion.

impl Into<BigUint> for Scalar[src]

fn into(self) -> BigUint[src]

Performs the conversion.

impl Mul<Scalar> for Scalar[src]

type Output = Self

The resulting type after applying the * operator.

fn mul(self, rhs: Scalar) -> Self::Output[src]

Performs the * operation. Read more

impl Neg for &Scalar[src]

type Output = Scalar

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Performs the unary - operation. Read more

impl Neg for Scalar[src]

type Output = Scalar

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Performs the unary - operation. Read more

impl PartialEq<Scalar> for Scalar[src]

fn eq(&self, other: &Scalar) -> bool[src]

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

fn ne(&self, other: &Scalar) -> bool[src]

This method tests for !=.

impl Product<Scalar> for Scalar[src]

fn product<I: Iterator<Item = Scalar>>(iter: I) -> Self[src]

Method which takes an iterator and generates Self from the elements by multiplying the items. Read more

impl Serialize for Scalar[src]

fn serialize<S>(
    &self,
    serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
    S: Serializer
[src]

Serialize this value into the given Serde serializer. Read more

impl Sum<Scalar> for Scalar[src]

fn sum<I: Iterator<Item = Scalar>>(iter: I) -> Self[src]

Method which takes an iterator and generates Self from the elements by “summing up” the items. Read more

impl TryFrom<Vec<u8, Global>> for Scalar[src]

type Error = CryptoError

The type returned in the event of a conversion error.

fn try_from(bytes: Vec<u8>) -> Result<Self, Self::Error>[src]

Performs the conversion.

impl Copy for Scalar[src]

impl Eq for Scalar[src]

impl StructuralEq for Scalar[src]

impl StructuralPartialEq for Scalar[src]

Auto Trait Implementations

impl RefUnwindSafe for Scalar

impl Send for Scalar

impl Sync for Scalar

impl Unpin for Scalar

impl UnwindSafe for Scalar

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

pub fn equivalent(&self, key: &K) -> bool[src]

Compare self to key and return true if they are equal.

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointable for T[src]

pub const ALIGN: usize[src]

The alignment of pointer.

type Init = T

The type for initializers.

pub unsafe fn init(init: <T as Pointable>::Init) -> usize[src]

Initializes a with the given initializer. Read more

pub unsafe fn deref<'a>(ptr: usize) -> &'a T[src]

Dereferences the given pointer. Read more

pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T[src]

Mutably dereferences the given pointer. Read more

pub unsafe fn drop(ptr: usize)[src]

Drops the object pointed to by the given pointer. Read more

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

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

recently added

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

pub fn vzip(self) -> V[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]