#[repr(C)]pub struct CompactPair<A, B> {
pub _phantom_0: PhantomData<UnsafeCell<A>>,
pub _phantom_1: PhantomData<UnsafeCell<B>>,
pub mFirst: A,
pub mSecond: B,
}Expand description
CompactPair is the logical concatenation of an instance of A with an instance B. Space is conserved when possible.
In general if space conservation is not critical is preferred to use std::pair.
Fields§
§_phantom_0: PhantomData<UnsafeCell<A>>§_phantom_1: PhantomData<UnsafeCell<B>>§mFirst: A§mSecond: BTrait Implementations§
Source§impl<A, B> Clone for CompactPair<A, B>
impl<A, B> Clone for CompactPair<A, B>
Source§fn clone(&self) -> CompactPair<A, B>
fn clone(&self) -> CompactPair<A, B>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<A, B> Debug for CompactPair<A, B>
impl<A, B> Debug for CompactPair<A, B>
Source§impl<A, B> PartialEq for CompactPair<A, B>
impl<A, B> PartialEq for CompactPair<A, B>
Source§fn eq(&self, other: &CompactPair<A, B>) -> bool
fn eq(&self, other: &CompactPair<A, B>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<A, B> Copy for CompactPair<A, B>
impl<A, B> StructuralPartialEq for CompactPair<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for CompactPair<A, B>
impl<A, B> !RefUnwindSafe for CompactPair<A, B>
impl<A, B> Send for CompactPair<A, B>
impl<A, B> !Sync for CompactPair<A, B>
impl<A, B> Unpin for CompactPair<A, B>
impl<A, B> UnsafeUnpin for CompactPair<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for CompactPair<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more