Union16

Struct Union16 

Source
pub struct Union16<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr, E: ErasablePtr, F: ErasablePtr, G: ErasablePtr, H: ErasablePtr, I: ErasablePtr, J: ErasablePtr = NeverPtr, K: ErasablePtr = NeverPtr, L: ErasablePtr = NeverPtr, M: ErasablePtr = NeverPtr, N: ErasablePtr = NeverPtr, O: ErasablePtr = NeverPtr, P: ErasablePtr = NeverPtr> { /* private fields */ }
Expand description

A pointer union of up to sixteen pointer types.

This is a tagged union of sixteen pointer types such as Box, Arc, or & that is only as big as a single pointer. This is accomplished by storing the tag in the alignment bits of the pointer.

As such, the pointer must be aligned to at least align(16). This is enforced through the use of Builder16.

Pointers beyond the ninth may be ommitted to create smaller unions. The default type, NeverPtr, will be an alias for ! once it is stable. This will not be considered a breaking change.

Implementations§

Source§

impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr, E: ErasablePtr, F: ErasablePtr, G: ErasablePtr, H: ErasablePtr, I: ErasablePtr, J: ErasablePtr, K: ErasablePtr, L: ErasablePtr, M: ErasablePtr, N: ErasablePtr, O: ErasablePtr, P: ErasablePtr> Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source

pub fn new_a(a: A) -> Result<Self, A>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_a(&self) -> bool

Check if the union is this variant.

Source

pub fn into_a(self) -> Result<A, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_a<R>(&self, f: impl FnOnce(&A) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn a(&self) -> Option<&A::Target>
where A: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_a(&self) -> Option<A>
where A: Clone,

Clone this variant out of the union.

Source

pub fn copy_a(&self) -> Option<A>
where A: Copy,

Copy this variant out of the union.

Source

pub fn new_b(b: B) -> Result<Self, B>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_b(&self) -> bool

Check if the union is this variant.

Source

pub fn into_b(self) -> Result<B, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_b<R>(&self, f: impl FnOnce(&B) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn b(&self) -> Option<&B::Target>
where B: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_b(&self) -> Option<B>
where B: Clone,

Clone this variant out of the union.

Source

pub fn copy_b(&self) -> Option<B>
where B: Copy,

Copy this variant out of the union.

Source

pub fn new_c(c: C) -> Result<Self, C>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_c(&self) -> bool

Check if the union is this variant.

Source

pub fn into_c(self) -> Result<C, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_c<R>(&self, f: impl FnOnce(&C) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn c(&self) -> Option<&C::Target>
where C: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_c(&self) -> Option<C>
where C: Clone,

Clone this variant out of the union.

Source

pub fn copy_c(&self) -> Option<C>
where C: Copy,

Copy this variant out of the union.

Source

pub fn new_d(d: D) -> Result<Self, D>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_d(&self) -> bool

Check if the union is this variant.

Source

pub fn into_d(self) -> Result<D, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_d<R>(&self, f: impl FnOnce(&D) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn d(&self) -> Option<&D::Target>
where D: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_d(&self) -> Option<D>
where D: Clone,

Clone this variant out of the union.

Source

pub fn copy_d(&self) -> Option<D>
where D: Copy,

Copy this variant out of the union.

Source

pub fn new_e(e: E) -> Result<Self, E>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_e(&self) -> bool

Check if the union is this variant.

Source

pub fn into_e(self) -> Result<E, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_e<R>(&self, f: impl FnOnce(&E) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn e(&self) -> Option<&E::Target>
where E: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_e(&self) -> Option<E>
where E: Clone,

Clone this variant out of the union.

Source

pub fn copy_e(&self) -> Option<E>
where E: Copy,

Copy this variant out of the union.

Source

pub fn new_f(f: F) -> Result<Self, F>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_f(&self) -> bool

Check if the union is this variant.

Source

pub fn into_f(self) -> Result<F, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_f<R>(&self, f: impl FnOnce(&F) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn f(&self) -> Option<&F::Target>
where F: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_f(&self) -> Option<F>
where F: Clone,

Clone this variant out of the union.

Source

pub fn copy_f(&self) -> Option<F>
where F: Copy,

Copy this variant out of the union.

Source

pub fn new_g(g: G) -> Result<Self, G>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_g(&self) -> bool

Check if the union is this variant.

Source

pub fn into_g(self) -> Result<G, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_g<R>(&self, f: impl FnOnce(&G) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn g(&self) -> Option<&G::Target>
where G: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_g(&self) -> Option<G>
where G: Clone,

Clone this variant out of the union.

Source

pub fn copy_g(&self) -> Option<G>
where G: Copy,

Copy this variant out of the union.

Source

pub fn new_h(h: H) -> Result<Self, H>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_h(&self) -> bool

Check if the union is this variant.

Source

pub fn into_h(self) -> Result<H, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_h<R>(&self, f: impl FnOnce(&H) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn h(&self) -> Option<&H::Target>
where H: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_h(&self) -> Option<H>
where H: Clone,

Clone this variant out of the union.

Source

pub fn copy_h(&self) -> Option<H>
where H: Copy,

Copy this variant out of the union.

Source

pub fn new_i(i: I) -> Result<Self, I>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_i(&self) -> bool

Check if the union is this variant.

Source

pub fn into_i(self) -> Result<I, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_i<R>(&self, f: impl FnOnce(&I) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn i(&self) -> Option<&I::Target>
where I: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_i(&self) -> Option<I>
where I: Clone,

Clone this variant out of the union.

Source

pub fn copy_i(&self) -> Option<I>
where I: Copy,

Copy this variant out of the union.

Source

pub fn new_j(j: J) -> Result<Self, J>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_j(&self) -> bool

Check if the union is this variant.

Source

pub fn into_j(self) -> Result<J, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_j<R>(&self, f: impl FnOnce(&J) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn j(&self) -> Option<&J::Target>
where J: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_j(&self) -> Option<J>
where J: Clone,

Clone this variant out of the union.

Source

pub fn copy_j(&self) -> Option<J>
where J: Copy,

Copy this variant out of the union.

Source

pub fn new_k(k: K) -> Result<Self, K>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_k(&self) -> bool

Check if the union is this variant.

Source

pub fn into_k(self) -> Result<K, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_k<R>(&self, f: impl FnOnce(&K) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn k(&self) -> Option<&K::Target>
where K: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_k(&self) -> Option<K>
where K: Clone,

Clone this variant out of the union.

Source

pub fn copy_k(&self) -> Option<K>
where K: Copy,

Copy this variant out of the union.

Source

pub fn new_l(l: L) -> Result<Self, L>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_l(&self) -> bool

Check if the union is this variant.

Source

pub fn into_l(self) -> Result<L, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_l<R>(&self, f: impl FnOnce(&L) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn l(&self) -> Option<&L::Target>
where L: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_l(&self) -> Option<L>
where L: Clone,

Clone this variant out of the union.

Source

pub fn copy_l(&self) -> Option<L>
where L: Copy,

Copy this variant out of the union.

Source

pub fn new_m(m: M) -> Result<Self, M>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_m(&self) -> bool

Check if the union is this variant.

Source

pub fn into_m(self) -> Result<M, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_m<R>(&self, f: impl FnOnce(&M) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn m(&self) -> Option<&M::Target>
where M: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_m(&self) -> Option<M>
where M: Clone,

Clone this variant out of the union.

Source

pub fn copy_m(&self) -> Option<M>
where M: Copy,

Copy this variant out of the union.

Source

pub fn new_n(n: N) -> Result<Self, N>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_n(&self) -> bool

Check if the union is this variant.

Source

pub fn into_n(self) -> Result<N, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_n<R>(&self, f: impl FnOnce(&N) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn n(&self) -> Option<&N::Target>
where N: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_n(&self) -> Option<N>
where N: Clone,

Clone this variant out of the union.

Source

pub fn copy_n(&self) -> Option<N>
where N: Copy,

Copy this variant out of the union.

Source

pub fn new_o(o: O) -> Result<Self, O>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_o(&self) -> bool

Check if the union is this variant.

Source

pub fn into_o(self) -> Result<O, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_o<R>(&self, f: impl FnOnce(&O) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn o(&self) -> Option<&O::Target>
where O: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_o(&self) -> Option<O>
where O: Clone,

Clone this variant out of the union.

Source

pub fn copy_o(&self) -> Option<O>
where O: Copy,

Copy this variant out of the union.

Source

pub fn new_p(p: P) -> Result<Self, P>

Construct a varaint of this union with a dynamic alignment check.

Source

pub fn is_p(&self) -> bool

Check if the union is this variant.

Source

pub fn into_p(self) -> Result<P, Self>

Extract this variant from the union.

Returns the union on error.

Source

pub fn with_p<R>(&self, f: impl FnOnce(&P) -> R) -> Option<R>

Run a closure with this variant.

Source

pub fn p(&self) -> Option<&P::Target>
where P: Deref,

Get a reference to this variant’s target.

Source

pub fn clone_p(&self) -> Option<P>
where P: Clone,

Clone this variant out of the union.

Source

pub fn copy_p(&self) -> Option<P>
where P: Copy,

Copy this variant out of the union.

Source

pub fn unpack(self) -> Enum16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Unpack this union into an enum.

Source

pub fn ptr_eq(&self, other: &Self) -> bool

Check if two unions are the same variant and point to the same value (not that the values compare as equal).

Source

pub fn as_deref<'a>( &'a self, builder: Builder16<&'a A::Target, &'a B::Target, &'a C::Target, &'a D::Target, &'a E::Target, &'a F::Target, &'a G::Target, &'a H::Target, &'a I::Target, &'a J::Target, &'a K::Target, &'a L::Target, &'a M::Target, &'a N::Target, &'a O::Target, &'a P::Target>, ) -> Union16<&'a A::Target, &'a B::Target, &'a C::Target, &'a D::Target, &'a E::Target, &'a F::Target, &'a G::Target, &'a H::Target, &'a I::Target, &'a J::Target, &'a K::Target, &'a L::Target, &'a M::Target, &'a N::Target, &'a O::Target, &'a P::Target>
where A: Deref, B: Deref, C: Deref, D: Deref, E: Deref, F: Deref, G: Deref, H: Deref, I: Deref, J: Deref, K: Deref, L: Deref, M: Deref, N: Deref, O: Deref, P: Deref, &'a A::Target: ErasablePtr, &'a B::Target: ErasablePtr, &'a C::Target: ErasablePtr, &'a D::Target: ErasablePtr, &'a E::Target: ErasablePtr, &'a F::Target: ErasablePtr, &'a G::Target: ErasablePtr, &'a H::Target: ErasablePtr, &'a I::Target: ErasablePtr, &'a J::Target: ErasablePtr, &'a K::Target: ErasablePtr, &'a L::Target: ErasablePtr, &'a M::Target: ErasablePtr, &'a N::Target: ErasablePtr, &'a O::Target: ErasablePtr, &'a P::Target: ErasablePtr,

Dereference the current pointer.

Source

pub unsafe fn as_deref_unchecked<'a>( &'a self, ) -> Union16<&'a A::Target, &'a B::Target, &'a C::Target, &'a D::Target, &'a E::Target, &'a F::Target, &'a G::Target, &'a H::Target, &'a I::Target, &'a J::Target, &'a K::Target, &'a L::Target, &'a M::Target, &'a N::Target, &'a O::Target, &'a P::Target>
where A: Deref, B: Deref, C: Deref, D: Deref, E: Deref, F: Deref, G: Deref, H: Deref, I: Deref, J: Deref, K: Deref, L: Deref, M: Deref, N: Deref, O: Deref, P: Deref, &'a A::Target: ErasablePtr, &'a B::Target: ErasablePtr, &'a C::Target: ErasablePtr, &'a D::Target: ErasablePtr, &'a E::Target: ErasablePtr, &'a F::Target: ErasablePtr, &'a G::Target: ErasablePtr, &'a H::Target: ErasablePtr, &'a I::Target: ErasablePtr, &'a J::Target: ErasablePtr, &'a K::Target: ErasablePtr, &'a L::Target: ErasablePtr, &'a M::Target: ErasablePtr, &'a N::Target: ErasablePtr, &'a O::Target: ErasablePtr, &'a P::Target: ErasablePtr,

Dereference the current pointer.

§Safety

The reference produced must be properly aligned. Note that only the actually produced reference is restricted, not the result of dereferencing any of the other types in this union.

Source

pub fn as_untagged_ptr(&self) -> ErasedPtr

Get the raw type-erased untagged pointer to the payload.

Source

pub fn try_deref<'a>( &'a self, ) -> Option<Union16<&'a A::Target, &'a B::Target, &'a C::Target, &'a D::Target, &'a E::Target, &'a F::Target, &'a G::Target, &'a H::Target, &'a I::Target, &'a J::Target, &'a K::Target, &'a L::Target, &'a M::Target, &'a N::Target, &'a O::Target, &'a P::Target>>
where A: Deref, B: Deref, C: Deref, D: Deref, E: Deref, F: Deref, G: Deref, H: Deref, I: Deref, J: Deref, K: Deref, L: Deref, M: Deref, N: Deref, O: Deref, P: Deref, &'a A::Target: ErasablePtr, &'a B::Target: ErasablePtr, &'a C::Target: ErasablePtr, &'a D::Target: ErasablePtr, &'a E::Target: ErasablePtr, &'a F::Target: ErasablePtr, &'a G::Target: ErasablePtr, &'a H::Target: ErasablePtr, &'a I::Target: ErasablePtr, &'a J::Target: ErasablePtr, &'a K::Target: ErasablePtr, &'a L::Target: ErasablePtr, &'a M::Target: ErasablePtr, &'a N::Target: ErasablePtr, &'a O::Target: ErasablePtr, &'a P::Target: ErasablePtr,

Dereference the current pointer.

Performs a dynamic alignment check on the dereferenced pointer.

Trait Implementations§

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Clone for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

fn clone(&self) -> Self

Returns a duplicate 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, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Debug for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

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

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

impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr, E: ErasablePtr, F: ErasablePtr, G: ErasablePtr, H: ErasablePtr, I: ErasablePtr, J: ErasablePtr, K: ErasablePtr, L: ErasablePtr, M: ErasablePtr, N: ErasablePtr, O: ErasablePtr, P: ErasablePtr> Drop for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<A: ErasablePtr, B: ErasablePtr, C: ErasablePtr, D: ErasablePtr, E: ErasablePtr, F: ErasablePtr, G: ErasablePtr, H: ErasablePtr, I: ErasablePtr, J: ErasablePtr, K: ErasablePtr, L: ErasablePtr, M: ErasablePtr, N: ErasablePtr, O: ErasablePtr, P: ErasablePtr> ErasablePtr for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

fn erase(this: Self) -> ErasedPtr

Turn this erasable pointer into an erased pointer. Read more
Source§

unsafe fn unerase(this: ErasedPtr) -> Self

Unerase this erased pointer. Read more
Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Hash for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

fn hash<Hasher>(&self, state: &mut Hasher)
where Hasher: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> PartialEq for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Eq for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Send for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Sync for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

Auto Trait Implementations§

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Freeze for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> RefUnwindSafe for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> Unpin for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>
where A: Unpin, B: Unpin, C: Unpin, D: Unpin, E: Unpin, F: Unpin, G: Unpin, H: Unpin, I: Unpin, J: Unpin, K: Unpin, L: Unpin, M: Unpin, N: Unpin, O: Unpin, P: Unpin,

§

impl<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P> UnwindSafe for Union16<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>

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> Erasable for T

Source§

const ACK_1_1_0: bool = true

Whether this implementor has acknowledged the 1.1.0 update to unerase’s documented implementation requirements. Read more
Source§

unsafe fn unerase(this: NonNull<Erased>) -> NonNull<T>

Unerase this erased pointer. Read more
Source§

fn erase(this: NonNull<Self>) -> NonNull<Erased>

Turn this erasable pointer into an erased pointer. 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.