pub struct Ref<'a, T>(/* private fields */)
where
T: 'a + Soapy;
Expand description
An immutable reference to an element of a Soa
.
This is similar to &T
for an element of a &[T]
. However, since the
fields are stored separately for SoA, we need a different type that has
references to each of fields for the element. This is a convenience wrapper
over Soapy::Ref
, which is implemented for each type that derives
Soapy
. It uses WithRef
to provide implementations of common standard
library traits with less codegen and ceremony than doing the same in the
macro.
Trait Implementations§
source§impl<'a, T> Ord for Ref<'a, T>
impl<'a, T> Ord for Ref<'a, T>
source§impl<'a, T, U, R> PartialOrd<R> for Ref<'a, T>
impl<'a, T, U, R> PartialOrd<R> for Ref<'a, T>
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<'a, T> Copy for Ref<'a, T>
impl<'a, T> Eq for Ref<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for Ref<'a, T>
impl<'a, T> Send for Ref<'a, T>
impl<'a, T> Sync for Ref<'a, T>
impl<'a, T> Unpin for Ref<'a, T>
impl<'a, T> UnwindSafe for Ref<'a, T>
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