Struct libpijul::pristine::Pair

source ·
#[repr(C)]
pub struct Pair<A, B> { pub a: A, pub b: B, }

Fields§

§a: A§b: B

Trait Implementations§

source§

impl<A: Check, B: Check> Check for Pair<A, B>

source§

fn add_refs<T: LoadPage>( &self, txn: &T, pages: &mut BTreeMap<u64, usize> ) -> Result<(), T::Error>
where T::Error: Debug,

source§

impl<A: Clone, B: Clone> Clone for Pair<A, B>

source§

fn clone(&self) -> Pair<A, B>

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, B: Debug> Debug for Pair<A, B>

source§

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

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

impl<A: Ord, B: Ord> Ord for Pair<A, B>

source§

fn cmp(&self, other: &Pair<A, B>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl<A: PartialEq, B: PartialEq> PartialEq for Pair<A, B>

source§

fn eq(&self, other: &Pair<A, B>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>

source§

fn partial_cmp(&self, other: &Pair<A, B>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<A: Storable, B: Storable> Storable for Pair<A, B>

§

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

If this value is an offset to another page at offset offset, return Some(offset). Return None else.
source§

fn compare<T: LoadPage>(&self, t: &T, b: &Self) -> Ordering

This is required for B trees, not necessarily for other structures. The default implementation panics.
§

unsafe fn drop<T>(&self, txn: &mut T) -> Result<(), <T as LoadPage>::Error>
where T: AllocPage,

If this value is an offset to another page at offset offset, return Some(offset). Return None else. Read more
source§

impl<A: Ord + UnsizedStorable, B: Ord + UnsizedStorable> UnsizedStorable for Pair<A, B>

source§

const ALIGN: usize = _

source§

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

Read the size from an on-page entry. If Self::SIZE.is_some() this must be the same value.
source§

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)

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)

Write to a page. Must not overwrite the allocated size, but this isn’t checked (which is why it’s unsafe).
source§

impl<A: Copy, B: Copy> Copy for Pair<A, B>

source§

impl<A: Eq, B: Eq> Eq for Pair<A, B>

source§

impl<A, B> StructuralPartialEq for Pair<A, B>

Auto Trait Implementations§

§

impl<A, B> RefUnwindSafe for Pair<A, B>

§

impl<A, B> Send for Pair<A, B>
where A: Send, B: Send,

§

impl<A, B> Sync for Pair<A, B>
where A: Sync, B: Sync,

§

impl<A, B> Unpin for Pair<A, B>
where A: Unpin, B: Unpin,

§

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

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V