Struct lup::Secret
[−]
[src]
pub struct Secret<E, T> {
pub evidence: Option<E>,
pub value: T,
}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.
Methods
impl<E, T> Secret<E, T>[src]
pub fn lt<U>(self, other: &U) -> Secret<E, bool> where
T: PartialOrd<U>, [src]
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.
pub fn le<U>(self, other: &U) -> Secret<E, bool> where
T: PartialOrd<U>, [src]
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.
pub fn gt<U>(self, other: &U) -> Secret<E, bool> where
T: PartialOrd<U>, [src]
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.
pub fn ge<U>(self, other: &U) -> Secret<E, bool> where
T: PartialOrd<U>, [src]
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.
pub fn eq<U>(self, other: &U) -> Secret<E, bool> where
T: PartialEq<U>, [src]
T: PartialEq<U>,
Checks if secret value is equal to value.
This is a method because Rust does not allow overriding the output type for comparison operators.
pub fn ne<U>(self, other: &U) -> Secret<E, bool> where
T: PartialEq<U>, [src]
T: PartialEq<U>,
Checks if secret value is not equal to value.
This is a method because Rust does not allow overriding the output type for comparison operators.
Trait Implementations
impl Lup<usize, Secret<usize, bool>> for Any<(usize, usize)>[src]
type Inner = Secret<(usize, usize), bool>
The resulting type.
fn start() -> Any<(usize, usize)>[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, bool>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), bool>> for Any<(usize, usize, usize)>[src]
type Inner = Secret<(usize, usize, usize), bool>
The resulting type.
fn start() -> Any<(usize, usize, usize)>[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), bool>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<usize, bool>> for All<(usize, usize)>[src]
type Inner = Secret<(usize, usize), bool>
The resulting type.
fn start() -> All<(usize, usize)>[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, bool>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Secret<(usize, usize), bool>[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), bool>> for All<(usize, usize, usize)>[src]
type Inner = Secret<(usize, usize, usize), bool>
The resulting type.
fn start() -> All<(usize, usize, usize)>[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), bool>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Secret<(usize, usize, usize), bool>[src]
Unwrap the resulting value.
impl Lup<usize, Secret<usize, f32>> for Max<(usize, usize), f32>[src]
type Inner = Secret<(usize, usize), f32>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, f32>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), f32>> for Max<(usize, usize, usize), f32>[src]
type Inner = Secret<(usize, usize, usize), f32>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), f32>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<usize, f64>> for Max<(usize, usize), f64>[src]
type Inner = Secret<(usize, usize), f64>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, f64>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), f64>> for Max<(usize, usize, usize), f64>[src]
type Inner = Secret<(usize, usize, usize), f64>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), f64>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<usize, f32>> for Min<(usize, usize), f32>[src]
type Inner = Secret<(usize, usize), f32>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, f32>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), f32>> for Min<(usize, usize, usize), f32>[src]
type Inner = Secret<(usize, usize, usize), f32>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), f32>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<usize, f64>> for Min<(usize, usize), f64>[src]
type Inner = Secret<(usize, usize), f64>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<usize, f64>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl Lup<usize, Secret<(usize, usize), f64>> for Min<(usize, usize, usize), f64>[src]
type Inner = Secret<(usize, usize, usize), f64>
The resulting type.
fn start() -> Self[src]
Initialize loop.
fn it(&mut self, ind: usize, val: Secret<(usize, usize), f64>) -> bool[src]
Iterate loop.
fn unwrap(self) -> Self::Inner[src]
Unwrap the resulting value.
impl<E, T> Neg for Secret<E, T> where
T: Neg, [src]
T: Neg,
type Output = Secret<E, T::Output>
The resulting type after applying the - operator.
fn neg(self) -> Secret<E, T::Output>[src]
Performs the unary - operation.