Skip to main content

SuchThat

Struct SuchThat 

Source
pub struct SuchThat<A, P> { /* private fields */ }
Expand description

A value with a proof attached

Implementations§

Source§

impl<A, P> SuchThat<A, P>

Source

pub fn value(self) -> A

Extracts the value from a proof-attached value

Source

pub fn value_ref(&self) -> &A

Returns a reference to the value of a proof-attached value

Source§

impl<A, N, P> SuchThat<Named<A, N>, P>

Source

pub fn extract(self) -> A

Extract the value from a proof-attached named value

Source

pub fn extract_ref(&self) -> &A

Returns a reference to the value of a proof-attached named value

Auto Trait Implementations§

§

impl<A, P> Freeze for SuchThat<A, P>
where A: Freeze,

§

impl<A, P> RefUnwindSafe for SuchThat<A, P>

§

impl<A, P> Send for SuchThat<A, P>
where A: Send, P: Send,

§

impl<A, P> Sync for SuchThat<A, P>
where A: Sync, P: Sync,

§

impl<A, P> Unpin for SuchThat<A, P>
where A: Unpin, P: Unpin,

§

impl<A, P> UnsafeUnpin for SuchThat<A, P>
where A: UnsafeUnpin,

§

impl<A, P> UnwindSafe for SuchThat<A, P>
where A: UnwindSafe, P: 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> 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, 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.