Trait extendr_api::prelude::Entity
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 = <Self::Group as ForType>::FaerOf<<I as Iterator>::Item>>;
type PrefixUnit<'a, S: Simd>: Copy + Read<Output = Self::SimdUnit<S>>;
type SuffixUnit<'a, S: Simd>: Copy + Read<Output = Self::SimdUnit<S>>;
type PrefixMutUnit<'a, S: Simd>: Write<Output = Self::SimdUnit<S>> + IntoConst<Target = Self::PrefixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut;
type SuffixMutUnit<'a, S: Simd>: Write<Output = Self::SimdUnit<S>> + IntoConst<Target = Self::SuffixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut;
Show 2 associated constants and 22 methods
const N_COMPONENTS: usize;
const UNIT: <Self::Group as ForType>::FaerOf<()>;
// Required methods
fn faer_first<T>(group: <Self::Group as ForType>::FaerOf<T>) -> T;
fn faer_from_units(
group: <Self::Group as ForType>::FaerOf<Self::Unit>,
) -> Self;
fn faer_into_units(self) -> <Self::Group as ForType>::FaerOf<Self::Unit>;
fn faer_as_ref<T>(
group: &<Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<&T>;
fn faer_as_mut<T>(
group: &mut <Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<&mut T>;
fn faer_as_ptr<T>(
group: *mut <Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<*mut T>;
fn faer_map_impl<T, U>(
group: <Self::Group as ForType>::FaerOf<T>,
f: &mut impl FnMut(T) -> U,
) -> <Self::Group as ForType>::FaerOf<U>;
fn faer_zip<T, U>(
first: <Self::Group as ForType>::FaerOf<T>,
second: <Self::Group as ForType>::FaerOf<U>,
) -> <Self::Group as ForType>::FaerOf<(T, U)>;
fn faer_unzip<T, U>(
zipped: <Self::Group as ForType>::FaerOf<(T, U)>,
) -> (<Self::Group as ForType>::FaerOf<T>, <Self::Group as ForType>::FaerOf<U>);
fn faer_map_with_context<Ctx, T, U>(
ctx: Ctx,
group: <Self::Group as ForType>::FaerOf<T>,
f: &mut impl FnMut(Ctx, T) -> (Ctx, U),
) -> (Ctx, <Self::Group as ForType>::FaerOf<U>);
fn faer_into_iter<I>(
iter: <Self::Group as ForType>::FaerOf<I>,
) -> Self::Iter<<I as IntoIterator>::IntoIter>
where I: IntoIterator;
// Provided methods
fn faer_map<T, U>(
group: <Self::Group as ForType>::FaerOf<T>,
f: impl FnMut(T) -> U,
) -> <Self::Group as ForType>::FaerOf<U> { ... }
fn faer_unzip2<T>(
zipped: <Self::Group as ForType>::FaerOf<[T; 2]>,
) -> [<Self::Group as ForType>::FaerOf<T>; 2] { ... }
fn faer_unzip4<T>(
zipped: <Self::Group as ForType>::FaerOf<[T; 4]>,
) -> [<Self::Group as ForType>::FaerOf<T>; 4] { ... }
fn faer_unzip8<T>(
zipped: <Self::Group as ForType>::FaerOf<[T; 8]>,
) -> [<Self::Group as ForType>::FaerOf<T>; 8] { ... }
fn faer_as_arrays<const N: usize, T>(
group: <Self::Group as ForType>::FaerOf<&[T]>,
) -> (<Self::Group as ForType>::FaerOf<&[[T; N]]>, <Self::Group as ForType>::FaerOf<&[T]>) { ... }
fn faer_as_arrays_mut<const N: usize, T>(
group: <Self::Group as ForType>::FaerOf<&mut [T]>,
) -> (<Self::Group as ForType>::FaerOf<&mut [[T; N]]>, <Self::Group as ForType>::FaerOf<&mut [T]>) { ... }
fn faer_deref<T>(
group: <Self::Group as ForType>::FaerOf<&T>,
) -> <Self::Group as ForType>::FaerOf<T>
where T: Copy { ... }
fn faer_rb<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short T>,
) -> <Self::Group as ForType>::FaerOf<<T as Reborrow<'short>>::Target>
where T: Reborrow<'short> { ... }
fn faer_rb_mut<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short mut T>,
) -> <Self::Group as ForType>::FaerOf<<T as ReborrowMut<'short>>::Target>
where T: ReborrowMut<'short> { ... }
fn faer_into_const<T>(
value: <Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<<T as IntoConst>::Target>
where T: IntoConst { ... }
fn faer_copy<T>(
x: &<Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<T>
where T: Copy { ... }
}
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 = <Self::Group as ForType>::FaerOf<<I as Iterator>::Item>>
type PrefixUnit<'a, S: Simd>: Copy + Read<Output = Self::SimdUnit<S>>
type SuffixUnit<'a, S: Simd>: Copy + Read<Output = Self::SimdUnit<S>>
type PrefixMutUnit<'a, S: Simd>: Write<Output = Self::SimdUnit<S>> + IntoConst<Target = Self::PrefixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut
type SuffixMutUnit<'a, S: Simd>: Write<Output = Self::SimdUnit<S>> + IntoConst<Target = Self::SuffixUnit<'a, S>> + UniversalReborrow + UniversalReborrowMut
Required Associated Constants§
const N_COMPONENTS: usize
const UNIT: <Self::Group as ForType>::FaerOf<()>
Required Methods§
fn faer_first<T>(group: <Self::Group as ForType>::FaerOf<T>) -> T
fn faer_from_units(group: <Self::Group as ForType>::FaerOf<Self::Unit>) -> Self
fn faer_into_units(self) -> <Self::Group as ForType>::FaerOf<Self::Unit>
fn faer_as_ref<T>( group: &<Self::Group as ForType>::FaerOf<T>, ) -> <Self::Group as ForType>::FaerOf<&T>
fn faer_as_mut<T>( group: &mut <Self::Group as ForType>::FaerOf<T>, ) -> <Self::Group as ForType>::FaerOf<&mut T>
fn faer_as_ptr<T>( group: *mut <Self::Group as ForType>::FaerOf<T>, ) -> <Self::Group as ForType>::FaerOf<*mut T>
fn faer_map_impl<T, U>( group: <Self::Group as ForType>::FaerOf<T>, f: &mut impl FnMut(T) -> U, ) -> <Self::Group as ForType>::FaerOf<U>
fn faer_zip<T, U>( first: <Self::Group as ForType>::FaerOf<T>, second: <Self::Group as ForType>::FaerOf<U>, ) -> <Self::Group as ForType>::FaerOf<(T, U)>
fn faer_unzip<T, U>( zipped: <Self::Group as ForType>::FaerOf<(T, U)>, ) -> (<Self::Group as ForType>::FaerOf<T>, <Self::Group as ForType>::FaerOf<U>)
fn faer_map_with_context<Ctx, T, U>( ctx: Ctx, group: <Self::Group as ForType>::FaerOf<T>, f: &mut impl FnMut(Ctx, T) -> (Ctx, U), ) -> (Ctx, <Self::Group as ForType>::FaerOf<U>)
fn faer_into_iter<I>(
iter: <Self::Group as ForType>::FaerOf<I>,
) -> Self::Iter<<I as IntoIterator>::IntoIter>where
I: IntoIterator,
Provided Methods§
fn faer_map<T, U>( group: <Self::Group as ForType>::FaerOf<T>, f: impl FnMut(T) -> U, ) -> <Self::Group as ForType>::FaerOf<U>
fn faer_unzip2<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 2]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 2]
fn faer_unzip4<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 4]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 4]
fn faer_unzip8<T>( zipped: <Self::Group as ForType>::FaerOf<[T; 8]>, ) -> [<Self::Group as ForType>::FaerOf<T>; 8]
fn faer_as_arrays<const N: usize, T>( group: <Self::Group as ForType>::FaerOf<&[T]>, ) -> (<Self::Group as ForType>::FaerOf<&[[T; N]]>, <Self::Group as ForType>::FaerOf<&[T]>)
fn faer_as_arrays_mut<const N: usize, T>( group: <Self::Group as ForType>::FaerOf<&mut [T]>, ) -> (<Self::Group as ForType>::FaerOf<&mut [[T; N]]>, <Self::Group as ForType>::FaerOf<&mut [T]>)
fn faer_deref<T>(
group: <Self::Group as ForType>::FaerOf<&T>,
) -> <Self::Group as ForType>::FaerOf<T>where
T: Copy,
fn faer_rb<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short T>,
) -> <Self::Group as ForType>::FaerOf<<T as Reborrow<'short>>::Target>where
T: Reborrow<'short>,
fn faer_rb_mut<'short, T>(
value: <Self::Group as ForType>::FaerOf<&'short mut T>,
) -> <Self::Group as ForType>::FaerOf<<T as ReborrowMut<'short>>::Target>where
T: ReborrowMut<'short>,
fn faer_into_const<T>(
value: <Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<<T as IntoConst>::Target>where
T: IntoConst,
fn faer_copy<T>(
x: &<Self::Group as ForType>::FaerOf<T>,
) -> <Self::Group as ForType>::FaerOf<T>where
T: Copy,
Object Safety§
This trait is not object safe.