Struct libpasta::primitives::Primitive
[−]
[src]
pub struct Primitive(pub Sod<PrimitiveImpl>);
Password hashing primitives
Each variant is backed up by different implementation.
Internally, primitives can either be static values, for example,
the lazy_static
generated value DEFAULT_PRIM
, or dynamically allocated
variables, which are Arc<Box<...>>
.
Most operations are expected to be performed using the static functions, since most use the default algorithms. However, the flexibilty to support arbitrary parameter sets is essential.
Trait Implementations
impl<'de> Deserialize<'de> for Primitive
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<'a> Serialize for Primitive
[src]
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where
S: Serializer,
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Clone for Primitive
[src]
fn clone(&self) -> Primitive
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Primitive
[src]
fn eq(&self, __arg_0: &Primitive) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Primitive) -> bool
This method tests for !=
.
impl PartialOrd for Primitive
[src]
fn partial_cmp(&self, __arg_0: &Primitive) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Primitive) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Primitive) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Primitive) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Primitive) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Primitive
[src]
impl<P: PrimitiveImpl + 'static> From<P> for Primitive
[src]
fn from(other: P) -> Self
Performs the conversion.
impl Deref for Primitive
[src]
type Target = Sod<PrimitiveImpl>
The resulting type after dereferencing
fn deref(&self) -> &Sod<PrimitiveImpl>
The method called to dereference a value
impl<'a> From<(&'a Hashes, &'a Map<String, Value>)> for Primitive
[src]
This will be TryFrom
when it stabilises.
For now we just return a Poisoned