pub struct Secret<E, T> {
pub evidence: Option<E>,
pub value: T,
}
Expand description
Stores a secret.
A secret is a data structure that might have some evidence. The evidence tells why the value has the value it has.
For example, the maximum value of a list could be stored as a secret which has as evidence the index where the maximum value can be found.
The meaning of secrets is interpreted depending on context.
Fields§
§evidence: Option<E>
The evidence for the value.
value: T
The value.
Implementations§
Source§impl<E, T> Secret<E, T>
impl<E, T> Secret<E, T>
Sourcepub fn lt<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
pub fn lt<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
Checks if secret value is less than value.
This is a method because Rust does not allow overriding the output type for comparison operators.
Sourcepub fn le<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
pub fn le<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
Checks if secret value is less or equal than value.
This is a method because Rust does not allow overriding the output type for comparison operators.
Sourcepub fn gt<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
pub fn gt<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
Checks if secret value is greater than value.
This is a method because Rust does not allow overriding the output type for comparison operators.
Sourcepub fn ge<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
pub fn ge<U>(self, other: &U) -> Secret<E, bool>where
T: PartialOrd<U>,
Checks if secret value is greater or equal than value.
This is a method because Rust does not allow overriding the output type for comparison operators.