pub struct EntropyQuality {
pub overall: f64,
pub uniformity: f64,
pub independence: f64,
pub predictability: f64,
}Expand description
Entropy quality assessment result
Fields§
§overall: f64Overall quality score (0.0 to 1.0)
uniformity: f64Uniformity score (0.0 to 1.0)
independence: f64Independence score (0.0 to 1.0)
predictability: f64Predictability score (0.0 to 1.0, lower is better)
Implementations§
Source§impl EntropyQuality
impl EntropyQuality
Sourcepub fn new(
overall: f64,
uniformity: f64,
independence: f64,
predictability: f64,
) -> EntropyQuality
pub fn new( overall: f64, uniformity: f64, independence: f64, predictability: f64, ) -> EntropyQuality
Create a new entropy quality assessment
Sourcepub fn is_acceptable(&self, threshold: f64) -> bool
pub fn is_acceptable(&self, threshold: f64) -> bool
Check if the entropy quality is acceptable for cryptographic use
Sourcepub fn is_excellent(&self) -> bool
pub fn is_excellent(&self) -> bool
Check if the entropy quality is excellent
Trait Implementations§
Source§impl Clone for EntropyQuality
impl Clone for EntropyQuality
Source§fn clone(&self) -> EntropyQuality
fn clone(&self) -> EntropyQuality
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EntropyQuality
impl Debug for EntropyQuality
Source§impl Display for EntropyQuality
impl Display for EntropyQuality
Source§impl PartialEq for EntropyQuality
impl PartialEq for EntropyQuality
Source§fn eq(&self, other: &EntropyQuality) -> bool
fn eq(&self, other: &EntropyQuality) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EntropyQuality
impl PartialOrd for EntropyQuality
impl Copy for EntropyQuality
impl StructuralPartialEq for EntropyQuality
Auto Trait Implementations§
impl Freeze for EntropyQuality
impl RefUnwindSafe for EntropyQuality
impl Send for EntropyQuality
impl Sync for EntropyQuality
impl Unpin for EntropyQuality
impl UnsafeUnpin for EntropyQuality
impl UnwindSafe for EntropyQuality
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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