#[repr(C)]pub struct Padded<T, P> {
pub value: T,
pub pad: P,
}
Fields§
§value: T
§pad: P
Trait Implementations§
source§impl<T: Ord, P: Ord> Ord for Padded<T, P>
impl<T: Ord, P: Ord> Ord for Padded<T, P>
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<T: PartialEq, P: PartialEq> PartialEq<Padded<T, P>> for Padded<T, P>
impl<T: PartialEq, P: PartialEq> PartialEq<Padded<T, P>> for Padded<T, P>
source§impl<T: PartialOrd, P: PartialOrd> PartialOrd<Padded<T, P>> for Padded<T, P>
impl<T: PartialOrd, P: PartialOrd> PartialOrd<Padded<T, P>> for Padded<T, P>
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 moreimpl<T: Copy, P: Copy> Copy for Padded<T, P>
impl<T: Eq, P: Eq> Eq for Padded<T, P>
impl<T: Pod, P: Padding> Pod for Padded<T, P>
impl<T, P> StructuralEq for Padded<T, P>
impl<T, P> StructuralPartialEq for Padded<T, P>
Auto Trait Implementations§
impl<T, P> RefUnwindSafe for Padded<T, P>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for Padded<T, P>where
P: Send,
T: Send,
impl<T, P> Sync for Padded<T, P>where
P: Sync,
T: Sync,
impl<T, P> Unpin for Padded<T, P>where
P: Unpin,
T: Unpin,
impl<T, P> UnwindSafe for Padded<T, P>where
P: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self
must have the same layout as the specified Bits
except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern
.source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self
.