#[repr(C)]pub struct Pair<A, B> {
pub a: A,
pub b: B,
}
Fields§
§a: A
§b: B
Trait Implementations§
source§impl<A: Ord, B: Ord> Ord for Pair<A, B>
impl<A: Ord, B: Ord> Ord for Pair<A, B>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<A: PartialEq, B: PartialEq> PartialEq for Pair<A, B>
impl<A: PartialEq, B: PartialEq> PartialEq for Pair<A, B>
source§impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl<A: Storable, B: Storable> Storable for Pair<A, B>
impl<A: Storable, B: Storable> Storable for Pair<A, B>
§type PageReferences = Chain<<A as Storable>::PageReferences, <B as Storable>::PageReferences>
type PageReferences = Chain<<A as Storable>::PageReferences, <B as Storable>::PageReferences>
An iterator over the offsets to pages contained in this
value. Only values from this crate can generate non-empty
iterators, but combined values (like tuples) must chain the
iterators returned by method
page_offsets
.source§fn page_references(&self) -> Self::PageReferences
fn page_references(&self) -> Self::PageReferences
If this value is an offset to another page at offset
offset
,
return Some(offset)
. Return None
else.source§impl<A: Ord + UnsizedStorable, B: Ord + UnsizedStorable> UnsizedStorable for Pair<A, B>
impl<A: Ord + UnsizedStorable, B: Ord + UnsizedStorable> UnsizedStorable for Pair<A, B>
const ALIGN: usize = _
source§fn size(&self) -> usize
fn size(&self) -> usize
If
Self::SIZE.is_some()
, this must return the same
value. The default implementation is Self;:SIZE.unwrap()
.source§unsafe fn onpage_size(p: *const u8) -> usize
unsafe fn onpage_size(p: *const u8) -> usize
Read the size from an on-page entry. If
Self::SIZE.is_some()
this must be the same value.unsafe fn from_raw_ptr<'a, T>(_: &T, p: *const u8) -> &'a Self
source§unsafe fn write_to_page_alloc<T: AllocPage>(&self, t: &mut T, p: *mut u8)
unsafe fn write_to_page_alloc<T: AllocPage>(&self, t: &mut T, p: *mut u8)
Write to a page. Must not overwrite the allocated size, but
this isn’t checked (which is why it’s unsafe). Read more
§unsafe fn write_to_page(&self, _: *mut u8)
unsafe fn write_to_page(&self, _: *mut u8)
Write to a page. Must not overwrite the allocated size, but
this isn’t checked (which is why it’s unsafe).
impl<A: Copy, B: Copy> Copy for Pair<A, B>
impl<A: Eq, B: Eq> Eq for Pair<A, B>
impl<A, B> StructuralPartialEq for Pair<A, B>
Auto Trait Implementations§
impl<A, B> RefUnwindSafe for Pair<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Pair<A, B>
impl<A, B> Sync for Pair<A, B>
impl<A, B> Unpin for Pair<A, B>
impl<A, B> UnwindSafe for Pair<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