Trait soa_derive::SoAIndexMut
source · pub trait SoAIndexMut<T>: Sealed {
type MutOutput;
// Required methods
fn get_mut(self, soa: T) -> Option<Self::MutOutput>;
unsafe fn get_unchecked_mut(self, soa: T) -> Self::MutOutput;
fn index_mut(self, soa: T) -> Self::MutOutput;
}
Expand description
Helper trait used for indexing operations returning mutable references.
Inspired by std::slice::SliceIndex
.
Required Associated Types§
Required Methods§
sourcefn get_mut(self, soa: T) -> Option<Self::MutOutput>
fn get_mut(self, soa: T) -> Option<Self::MutOutput>
Returns the mutable reference output in this location if in bounds,
None
otherwise.
sourceunsafe fn get_unchecked_mut(self, soa: T) -> Self::MutOutput
unsafe fn get_unchecked_mut(self, soa: T) -> Self::MutOutput
Returns the mutable reference output in this location without performing any bounds check.
Safety
The index must be in bounds.