Struct Secret

Source
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>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn eq<U>(self, other: &U) -> Secret<E, bool>
where 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.

Source

pub fn ne<U>(self, other: &U) -> Secret<E, bool>
where 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§

Source§

impl<E: Clone, T: Clone> Clone for Secret<E, T>

Source§

fn clone(&self) -> Secret<E, T>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E: Debug, T: Debug> Debug for Secret<E, T>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Lup<usize, Secret<(usize, usize), bool>> for All<(usize, usize, usize)>

Source§

type Inner = Secret<(usize, usize, usize), bool>

The resulting type.
Source§

fn start() -> All<(usize, usize, usize)>

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), bool>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Secret<(usize, usize, usize), bool>

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<(usize, usize), bool>> for Any<(usize, usize, usize)>

Source§

type Inner = Secret<(usize, usize, usize), bool>

The resulting type.
Source§

fn start() -> Any<(usize, usize, usize)>

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), bool>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<(usize, usize), f32>> for Max<(usize, usize, usize), f32>

Source§

type Inner = Secret<(usize, usize, usize), f32>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), f32>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<(usize, usize), f32>> for Min<(usize, usize, usize), f32>

Source§

type Inner = Secret<(usize, usize, usize), f32>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), f32>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<(usize, usize), f64>> for Max<(usize, usize, usize), f64>

Source§

type Inner = Secret<(usize, usize, usize), f64>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), f64>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<(usize, usize), f64>> for Min<(usize, usize, usize), f64>

Source§

type Inner = Secret<(usize, usize, usize), f64>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<(usize, usize), f64>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, bool>> for All<(usize, usize)>

Source§

type Inner = Secret<(usize, usize), bool>

The resulting type.
Source§

fn start() -> All<(usize, usize)>

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, bool>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Secret<(usize, usize), bool>

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, bool>> for Any<(usize, usize)>

Source§

type Inner = Secret<(usize, usize), bool>

The resulting type.
Source§

fn start() -> Any<(usize, usize)>

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, bool>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, f32>> for Max<(usize, usize), f32>

Source§

type Inner = Secret<(usize, usize), f32>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, f32>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, f32>> for Min<(usize, usize), f32>

Source§

type Inner = Secret<(usize, usize), f32>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, f32>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, f64>> for Max<(usize, usize), f64>

Source§

type Inner = Secret<(usize, usize), f64>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, f64>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl Lup<usize, Secret<usize, f64>> for Min<(usize, usize), f64>

Source§

type Inner = Secret<(usize, usize), f64>

The resulting type.
Source§

fn start() -> Self

Initialize loop.
Source§

fn it(&mut self, ind: usize, val: Secret<usize, f64>) -> bool

Iterate loop.
Source§

fn unwrap(self) -> Self::Inner

Unwrap the resulting value.
Source§

impl<E, T> Neg for Secret<E, T>
where T: Neg,

Source§

type Output = Secret<E, <T as Neg>::Output>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Secret<E, T::Output>

Performs the unary - operation. Read more
Source§

impl<E> Not for Secret<E, bool>

Source§

type Output = Secret<E, bool>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Secret<E, bool>

Performs the unary ! operation. Read more

Auto Trait Implementations§

§

impl<E, T> Freeze for Secret<E, T>
where T: Freeze, E: Freeze,

§

impl<E, T> RefUnwindSafe for Secret<E, T>

§

impl<E, T> Send for Secret<E, T>
where T: Send, E: Send,

§

impl<E, T> Sync for Secret<E, T>
where T: Sync, E: Sync,

§

impl<E, T> Unpin for Secret<E, T>
where T: Unpin, E: Unpin,

§

impl<E, T> UnwindSafe for Secret<E, T>
where T: UnwindSafe, E: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.