Trait faer_entity::Entity
source · pub unsafe trait Entity: Copy + Pod + PartialEq + Send + Sync + Debug + 'static {
type Group: ForType + ForCopyType + ForDebugType;
type Unit: Copy + Pod + PartialEq + Send + Sync + Debug + 'static;
type Index: Copy + Pod + Send + Sync + Debug + 'static;
type SimdUnit<S: Simd>: Copy + Pod + Send + Sync + Debug + 'static;
type SimdMask<S: Simd>: Copy + Send + Sync + Debug + 'static;
type SimdIndex<S: Simd>: Copy + Pod + Send + Sync + Debug + 'static;
type Iter<I: Iterator>: Iterator<Item = GroupFor<Self, I::Item>>;
type PrefixUnit<'a, S: Simd>: Copy + Read<Output = SimdUnitFor<Self, S>>;
type SuffixUnit<'a, S: Simd>: Copy + Read<Output = SimdUnitFor<Self, S>>;
type PrefixMutUnit<'a, S: Simd>: Write<Output = SimdUnitFor<Self, S>> + IntoConst<Target = Self::PrefixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut;
type SuffixMutUnit<'a, S: Simd>: Write<Output = SimdUnitFor<Self, S>> + IntoConst<Target = Self::SuffixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut;
Show 2 associated constants and 22 methods
const N_COMPONENTS: usize;
const UNIT: GroupFor<Self, ()>;
// Required methods
fn faer_first<T>(group: GroupFor<Self, T>) -> T;
fn faer_from_units(group: GroupFor<Self, UnitFor<Self>>) -> Self;
fn faer_into_units(self) -> GroupFor<Self, UnitFor<Self>>;
fn faer_as_ref<T>(group: &GroupFor<Self, T>) -> GroupFor<Self, &T>;
fn faer_as_mut<T>(group: &mut GroupFor<Self, T>) -> GroupFor<Self, &mut T>;
fn faer_as_ptr<T>(group: *mut GroupFor<Self, T>) -> GroupFor<Self, *mut T>;
fn faer_map_impl<T, U>(
group: GroupFor<Self, T>,
f: &mut impl FnMut(T) -> U
) -> GroupFor<Self, U>;
fn faer_zip<T, U>(
first: GroupFor<Self, T>,
second: GroupFor<Self, U>
) -> GroupFor<Self, (T, U)>;
fn faer_unzip<T, U>(
zipped: GroupFor<Self, (T, U)>
) -> (GroupFor<Self, T>, GroupFor<Self, U>);
fn faer_map_with_context<Ctx, T, U>(
ctx: Ctx,
group: GroupFor<Self, T>,
f: &mut impl FnMut(Ctx, T) -> (Ctx, U)
) -> (Ctx, GroupFor<Self, U>);
fn faer_into_iter<I: IntoIterator>(
iter: GroupFor<Self, I>
) -> Self::Iter<I::IntoIter>;
// Provided methods
fn faer_map<T, U>(
group: GroupFor<Self, T>,
f: impl FnMut(T) -> U
) -> GroupFor<Self, U> { ... }
fn faer_unzip2<T>(zipped: GroupFor<Self, [T; 2]>) -> [GroupFor<Self, T>; 2] { ... }
fn faer_unzip4<T>(zipped: GroupFor<Self, [T; 4]>) -> [GroupFor<Self, T>; 4] { ... }
fn faer_unzip8<T>(zipped: GroupFor<Self, [T; 8]>) -> [GroupFor<Self, T>; 8] { ... }
fn faer_as_arrays<const N: usize, T>(
group: GroupFor<Self, &[T]>
) -> (GroupFor<Self, &[[T; N]]>, GroupFor<Self, &[T]>) { ... }
fn faer_as_arrays_mut<const N: usize, T>(
group: GroupFor<Self, &mut [T]>
) -> (GroupFor<Self, &mut [[T; N]]>, GroupFor<Self, &mut [T]>) { ... }
fn faer_deref<T: Copy>(group: GroupFor<Self, &T>) -> GroupFor<Self, T> { ... }
fn faer_rb<'short, T: Reborrow<'short>>(
value: GroupFor<Self, &'short T>
) -> GroupFor<Self, T::Target> { ... }
fn faer_rb_mut<'short, T: ReborrowMut<'short>>(
value: GroupFor<Self, &'short mut T>
) -> GroupFor<Self, T::Target> { ... }
fn faer_into_const<T: IntoConst>(
value: GroupFor<Self, T>
) -> GroupFor<Self, T::Target> { ... }
fn faer_copy<T: Copy>(x: &GroupFor<Self, T>) -> GroupFor<Self, T> { ... }
}Expand description
Unstable core trait for describing how a scalar value may be split up into individual component.
For example, f64 is treated as a single indivisible unit, but num_complex::Complex<f64>
is split up into its real and imaginary components, with each one being stored in a separate
container.
§Safety
The associated types and functions must fulfill their respective contracts.
Required Associated Types§
type Group: ForType + ForCopyType + ForDebugType
type Unit: Copy + Pod + PartialEq + Send + Sync + Debug + 'static
type Index: Copy + Pod + Send + Sync + Debug + 'static
type SimdUnit<S: Simd>: Copy + Pod + Send + Sync + Debug + 'static
type SimdMask<S: Simd>: Copy + Send + Sync + Debug + 'static
type SimdIndex<S: Simd>: Copy + Pod + Send + Sync + Debug + 'static
type Iter<I: Iterator>: Iterator<Item = GroupFor<Self, I::Item>>
type PrefixUnit<'a, S: Simd>: Copy + Read<Output = SimdUnitFor<Self, S>>
type SuffixUnit<'a, S: Simd>: Copy + Read<Output = SimdUnitFor<Self, S>>
type PrefixMutUnit<'a, S: Simd>: Write<Output = SimdUnitFor<Self, S>> + IntoConst<Target = Self::PrefixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut
type SuffixMutUnit<'a, S: Simd>: Write<Output = SimdUnitFor<Self, S>> + IntoConst<Target = Self::SuffixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut
Required Associated Constants§
Required Methods§
fn faer_first<T>(group: GroupFor<Self, T>) -> T
fn faer_from_units(group: GroupFor<Self, UnitFor<Self>>) -> Self
fn faer_into_units(self) -> GroupFor<Self, UnitFor<Self>>
fn faer_as_ref<T>(group: &GroupFor<Self, T>) -> GroupFor<Self, &T>
fn faer_as_mut<T>(group: &mut GroupFor<Self, T>) -> GroupFor<Self, &mut T>
fn faer_as_ptr<T>(group: *mut GroupFor<Self, T>) -> GroupFor<Self, *mut T>
fn faer_map_impl<T, U>( group: GroupFor<Self, T>, f: &mut impl FnMut(T) -> U ) -> GroupFor<Self, U>
fn faer_zip<T, U>( first: GroupFor<Self, T>, second: GroupFor<Self, U> ) -> GroupFor<Self, (T, U)>
fn faer_unzip<T, U>( zipped: GroupFor<Self, (T, U)> ) -> (GroupFor<Self, T>, GroupFor<Self, U>)
fn faer_map_with_context<Ctx, T, U>( ctx: Ctx, group: GroupFor<Self, T>, f: &mut impl FnMut(Ctx, T) -> (Ctx, U) ) -> (Ctx, GroupFor<Self, U>)
fn faer_into_iter<I: IntoIterator>( iter: GroupFor<Self, I> ) -> Self::Iter<I::IntoIter>
Provided Methods§
fn faer_map<T, U>( group: GroupFor<Self, T>, f: impl FnMut(T) -> U ) -> GroupFor<Self, U>
fn faer_unzip2<T>(zipped: GroupFor<Self, [T; 2]>) -> [GroupFor<Self, T>; 2]
fn faer_unzip4<T>(zipped: GroupFor<Self, [T; 4]>) -> [GroupFor<Self, T>; 4]
fn faer_unzip8<T>(zipped: GroupFor<Self, [T; 8]>) -> [GroupFor<Self, T>; 8]
fn faer_as_arrays<const N: usize, T>( group: GroupFor<Self, &[T]> ) -> (GroupFor<Self, &[[T; N]]>, GroupFor<Self, &[T]>)
fn faer_as_arrays_mut<const N: usize, T>( group: GroupFor<Self, &mut [T]> ) -> (GroupFor<Self, &mut [[T; N]]>, GroupFor<Self, &mut [T]>)
fn faer_deref<T: Copy>(group: GroupFor<Self, &T>) -> GroupFor<Self, T>
fn faer_rb<'short, T: Reborrow<'short>>( value: GroupFor<Self, &'short T> ) -> GroupFor<Self, T::Target>
fn faer_rb_mut<'short, T: ReborrowMut<'short>>( value: GroupFor<Self, &'short mut T> ) -> GroupFor<Self, T::Target>
fn faer_into_const<T: IntoConst>( value: GroupFor<Self, T> ) -> GroupFor<Self, T::Target>
fn faer_copy<T: Copy>(x: &GroupFor<Self, T>) -> GroupFor<Self, T>
Object Safety§
This trait is not object safe.