Struct transient::Inv

source ·
pub struct Inv<'a>(/* private fields */);
Expand description

Used to declare an invariant relationship between a type and its lifetime parameter.

An invariant type is one for which the compiler cannot safely assume that its lifetime may be shortened or lengthened (e.g. 'b in &'a mut &'b T). Such a type must therefore match the expected lifetime exactly when passed to a function.

See the Transience documentation for more information.

Trait Implementations§

source§

impl<'a> Clone for Inv<'a>

source§

fn clone(&self) -> Inv<'a>

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<'a> Debug for Inv<'a>

source§

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

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

impl<'a, R> CanRecoverFrom<(R,)> for Inv<'a>
where Inv<'a>: CanRecoverFrom<R>,

source§

impl<'a, R1, R2> CanRecoverFrom<(R1, R2)> for Inv<'a>
where Inv<'a>: CanRecoverFrom<R1> + CanRecoverFrom<R2>,

source§

impl<'a, R1, R2, R3> CanRecoverFrom<(R1, R2, R3)> for Inv<'a>
where Inv<'a>: CanRecoverFrom<R1> + CanRecoverFrom<R2> + CanRecoverFrom<R3>,

source§

impl<'a, R1, R2, R3, R4> CanRecoverFrom<(R1, R2, R3, R4)> for Inv<'a>

source§

impl<'a, 'b: 'a> CanRecoverFrom<Co<'b>> for Inv<'a>

source§

impl<'a, 'b: 'a> CanRecoverFrom<Contra<'a>> for Inv<'b>

source§

impl<'a, R> CanRecoverFrom<Inv<'a>> for (R,)
where R: CanRecoverFrom<Inv<'a>>,

source§

impl<'a, R1, R2> CanRecoverFrom<Inv<'a>> for (R1, R2)
where R1: CanRecoverFrom<Inv<'a>>, R2: CanRecoverFrom<Inv<'a>>,

source§

impl<'a, R1, R2, R3> CanRecoverFrom<Inv<'a>> for (R1, R2, R3)
where R1: CanRecoverFrom<Inv<'a>>, R2: CanRecoverFrom<Inv<'a>>, R3: CanRecoverFrom<Inv<'a>>,

source§

impl<'a, R1, R2, R3, R4> CanRecoverFrom<Inv<'a>> for (R1, R2, R3, R4)
where R1: CanRecoverFrom<Inv<'a>>, R2: CanRecoverFrom<Inv<'a>>, R3: CanRecoverFrom<Inv<'a>>, R4: CanRecoverFrom<Inv<'a>>,

source§

impl<'a> CanRecoverFrom<Inv<'a>> for Co<'a>

source§

impl<'a> CanRecoverFrom<Inv<'a>> for Contra<'a>

source§

impl<'a> CanRecoverFrom<Inv<'a>> for Inv<'a>

source§

impl<'a, R> CanTranscendTo<(R,)> for Inv<'a>
where Inv<'a>: CanTranscendTo<R>,

source§

impl<'a, R1, R2> CanTranscendTo<(R1, R2)> for Inv<'a>
where Inv<'a>: CanTranscendTo<R1> + CanTranscendTo<R2>,

source§

impl<'a, R1, R2, R3> CanTranscendTo<(R1, R2, R3)> for Inv<'a>
where Inv<'a>: CanTranscendTo<R1> + CanTranscendTo<R2> + CanTranscendTo<R3>,

source§

impl<'a, R1, R2, R3, R4> CanTranscendTo<(R1, R2, R3, R4)> for Inv<'a>

source§

impl<'a, R> CanTranscendTo<Inv<'a>> for (R,)
where R: CanTranscendTo<Inv<'a>>,

source§

impl<'a, R1, R2> CanTranscendTo<Inv<'a>> for (R1, R2)
where R1: CanTranscendTo<Inv<'a>>, R2: CanTranscendTo<Inv<'a>>,

source§

impl<'a, R1, R2, R3> CanTranscendTo<Inv<'a>> for (R1, R2, R3)
where R1: CanTranscendTo<Inv<'a>>, R2: CanTranscendTo<Inv<'a>>, R3: CanTranscendTo<Inv<'a>>,

source§

impl<'a, R1, R2, R3, R4> CanTranscendTo<Inv<'a>> for (R1, R2, R3, R4)
where R1: CanTranscendTo<Inv<'a>>, R2: CanTranscendTo<Inv<'a>>, R3: CanTranscendTo<Inv<'a>>, R4: CanTranscendTo<Inv<'a>>,

source§

impl<'a, 'b: 'a> CanTranscendTo<Inv<'a>> for Co<'b>

source§

impl<'a> CanTranscendTo<Inv<'a>> for Inv<'a>

source§

impl<'a, 'b: 'a> CanTranscendTo<Inv<'b>> for Contra<'a>

source§

impl<'a> Copy for Inv<'a>

source§

impl<'a> Transience for Inv<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Inv<'a>

§

impl<'a> RefUnwindSafe for Inv<'a>

§

impl<'a> Send for Inv<'a>

§

impl<'a> Sync for Inv<'a>

§

impl<'a> Unpin for Inv<'a>

§

impl<'a> UnwindSafe for Inv<'a>

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> ToOwned for T
where T: Clone,

§

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

§

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

§

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.