#[repr(C)]pub struct CTup2<A, B>(pub A, pub B);
Expand description
FFI-safe 2 element tuple.
Tuple Fields
0: A
1: B
Implementations
sourceimpl<A, B> CTup2<A, B>
impl<A, B> CTup2<A, B>
sourcepub fn into_tuple(self) -> (A, B)
pub fn into_tuple(self) -> (A, B)
Convert this C tuple into Rust tuple.
Trait Implementations
sourceimpl<A: Ord, B: Ord> Ord for CTup2<A, B>
impl<A: Ord, B: Ord> Ord for CTup2<A, B>
sourceimpl<A: PartialOrd, B: PartialOrd> PartialOrd<CTup2<A, B>> for CTup2<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd<CTup2<A, B>> for CTup2<A, B>
sourcefn partial_cmp(&self, other: &CTup2<A, B>) -> Option<Ordering>
fn partial_cmp(&self, other: &CTup2<A, B>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn 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 more
impl<A: Copy, B: Copy> Copy for CTup2<A, B>
impl<A: Eq, B: Eq> Eq for CTup2<A, B>
impl<A, B> StructuralEq for CTup2<A, B>
impl<A, B> StructuralPartialEq for CTup2<A, B>
Auto Trait Implementations
impl<A, B> RefUnwindSafe for CTup2<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for CTup2<A, B> where
A: Send,
B: Send,
impl<A, B> Sync for CTup2<A, B> where
A: Sync,
B: Sync,
impl<A, B> Unpin for CTup2<A, B> where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for CTup2<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more