Struct ShimToken

Source
pub struct ShimToken<Underlying, Scalar, Token>(/* private fields */);
Expand description

Shim that converts the associated token.

Trait Implementations§

Source§

impl<Underlying, Scalar, Token> Add<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Add<Scalar, Output = Underlying>, Scalar: Copy,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Scalar) -> Self

Performs the + operation. Read more
Source§

impl<Underlying, Scalar, Token> Add for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Add<Underlying, Output = Underlying>,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: Self) -> Self

Performs the + operation. Read more
Source§

impl<Underlying, Scalar, Token> AddAssign<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + AddAssign<Scalar>, Scalar: Copy,

Source§

fn add_assign(&mut self, rhs: Scalar)

Performs the += operation. Read more
Source§

impl<Underlying, Scalar, Token> AddAssign for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + AddAssign<Underlying>, Scalar: Copy,

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl<Underlying, Scalar, Token> AsMut<[Scalar]> for ShimToken<Underlying, Scalar, Token>
where Underlying: AsMut<[Scalar]>,

Source§

fn as_mut(&mut self) -> &mut [Scalar]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<Underlying, Scalar, Token> AsRef<[Scalar]> for ShimToken<Underlying, Scalar, Token>
where Underlying: AsRef<[Scalar]>,

Source§

fn as_ref(&self) -> &[Scalar]

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<Underlying: Clone, Scalar: Clone, Token: Clone> Clone for ShimToken<Underlying, Scalar, Token>

Source§

fn clone(&self) -> ShimToken<Underlying, Scalar, Token>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Underlying, Real, Token> Complex for ShimToken<Underlying, Complex<Real>, Token>
where Underlying: Vector<Scalar = Complex<Real>> + Complex<RealScalar = Real>, Real: Copy, Token: Token, Underlying::Token: From<Token>,

Source§

type RealScalar = Real

The real scalar type.
Source§

fn conj(self) -> Self

Conjugate.
Source§

fn mul_i(self) -> Self

Multiply by i.
Source§

fn mul_neg_i(self) -> Self

Multiply by -i.
Source§

impl<Underlying: Debug, Scalar: Debug, Token: Debug> Debug for ShimToken<Underlying, Scalar, Token>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Underlying, Scalar, Token> Deref for ShimToken<Underlying, Scalar, Token>
where Underlying: Deref,

Source§

type Target = <Underlying as Deref>::Target

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<Underlying, Scalar, Token> DerefMut for ShimToken<Underlying, Scalar, Token>
where Underlying: DerefMut,

Source§

fn deref_mut(&mut self) -> &mut <Self as Deref>::Target

Mutably dereferences the value.
Source§

impl<Underlying, Scalar, Token> Div<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Div<Scalar, Output = Underlying>, Scalar: Copy,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Scalar) -> Self

Performs the / operation. Read more
Source§

impl<Underlying, Scalar, Token> Div for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Div<Underlying, Output = Underlying>,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the / operator.
Source§

fn div(self, rhs: Self) -> Self

Performs the / operation. Read more
Source§

impl<Underlying, Scalar, Token> DivAssign<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + DivAssign<Scalar>, Scalar: Copy,

Source§

fn div_assign(&mut self, rhs: Scalar)

Performs the /= operation. Read more
Source§

impl<Underlying, Scalar, Token> DivAssign for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + DivAssign<Underlying>, Scalar: Copy,

Source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
Source§

impl<Underlying, Scalar, Token> Mul<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Mul<Scalar, Output = Underlying>, Scalar: Copy,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Scalar) -> Self

Performs the * operation. Read more
Source§

impl<Underlying, Scalar, Token> Mul for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Mul<Underlying, Output = Underlying>,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Self) -> Self

Performs the * operation. Read more
Source§

impl<Underlying, Scalar, Token> MulAssign<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + MulAssign<Scalar>, Scalar: Copy,

Source§

fn mul_assign(&mut self, rhs: Scalar)

Performs the *= operation. Read more
Source§

impl<Underlying, Scalar, Token> MulAssign for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + MulAssign<Underlying>, Scalar: Copy,

Source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
Source§

impl<Underlying, Scalar, Token> Neg for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Neg<Output = Underlying>,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self

Performs the unary - operation. Read more
Source§

impl<Underlying, Scalar, Token> Product<ShimToken<Underlying, Scalar, Token>> for <ShimToken<Underlying, Scalar, Token> as Vector>::Scalar
where Option<ShimToken<Underlying, Scalar, Token>>: Product<ShimToken<Underlying, Scalar, Token>>, Underlying: Vector<Scalar = Scalar>, Scalar: Copy + Mul<Self, Output = Self> + Default, Token: Token, Underlying::Token: From<Token>,

Source§

fn product<I>(iter: I) -> Self
where I: Iterator<Item = ShimToken<Underlying, Scalar, Token>>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<Underlying, Scalar, Token> Product<ShimToken<Underlying, Scalar, Token>> for Option<ShimToken<Underlying, Scalar, Token>>
where ShimToken<Underlying, Scalar, Token>: MulAssign, Underlying: Copy,

Source§

fn product<I>(iter: I) -> Self
where I: Iterator<Item = ShimToken<Underlying, Scalar, Token>>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl<Underlying, Scalar, Token> Sub<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Sub<Scalar, Output = Underlying>, Scalar: Copy,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Scalar) -> Self

Performs the - operation. Read more
Source§

impl<Underlying, Scalar, Token> Sub for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + Sub<Underlying, Output = Underlying>,

Source§

type Output = ShimToken<Underlying, Scalar, Token>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: Self) -> Self

Performs the - operation. Read more
Source§

impl<Underlying, Scalar, Token> SubAssign<Scalar> for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + SubAssign<Scalar>, Scalar: Copy,

Source§

fn sub_assign(&mut self, rhs: Scalar)

Performs the -= operation. Read more
Source§

impl<Underlying, Scalar, Token> SubAssign for ShimToken<Underlying, Scalar, Token>
where Underlying: Copy + SubAssign<Underlying>, Scalar: Copy,

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

impl<Underlying, Scalar, Token> Sum<ShimToken<Underlying, Scalar, Token>> for <ShimToken<Underlying, Scalar, Token> as Vector>::Scalar
where Option<ShimToken<Underlying, Scalar, Token>>: Sum<ShimToken<Underlying, Scalar, Token>>, Underlying: Vector<Scalar = Scalar>, Scalar: Copy + Add<Self, Output = Self> + Default, Token: Token, Underlying::Token: From<Token>,

Source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = ShimToken<Underlying, Scalar, Token>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<Underlying, Scalar, Token> Sum<ShimToken<Underlying, Scalar, Token>> for Option<ShimToken<Underlying, Scalar, Token>>
where ShimToken<Underlying, Scalar, Token>: AddAssign, Underlying: Copy,

Source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = ShimToken<Underlying, Scalar, Token>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
Source§

impl<Underlying, Scalar, Token> Vector for ShimToken<Underlying, Scalar, Token>
where Underlying: Vector<Scalar = Scalar>, Scalar: Copy, Token: Token + Into<<Underlying as Vector>::Token>,

Source§

type Scalar = Scalar

The type of elements in the vector.
Source§

type Token = Token

The token that proves support for this vector on the CPU.
Source§

type Width = <Underlying as Vector>::Width

The number of elements in the vector.
Source§

type Underlying = <Underlying as Vector>::Underlying

The underlying type
Source§

fn zeroed(token: Self::Token) -> Self

Create a new vector with each lane containing zeroes.
Source§

fn splat(token: Self::Token, from: Self::Scalar) -> Self

Create a new vector with each lane containing the provided value.
Source§

fn width() -> usize

Returns the number of lanes.
Source§

fn to_token(self) -> Self::Token

Creates a new instance of Token from a vector.
Source§

fn as_slice(&self) -> &[Self::Scalar]

Returns a slice containing the vector.
Source§

fn as_slice_mut(&mut self) -> &mut [Self::Scalar]

Returns a mutable slice containing the vector.
Source§

fn to_underlying(self) -> Self::Underlying

Converts this vector to its underlying type.
Source§

fn from_underlying(token: Self::Token, underlying: Self::Underlying) -> Self

Converts the underlying type to a vector.
Source§

unsafe fn read_ptr(token: Self::Token, from: *const Self::Scalar) -> Self

Read from a pointer. Read more
Source§

unsafe fn read_aligned_ptr( token: Self::Token, from: *const Self::Scalar, ) -> Self

Read from a vector-aligned pointer. Read more
Source§

unsafe fn read_unchecked(token: Self::Token, from: &[Self::Scalar]) -> Self

Read from a vector-aligned pointer. Read from a slice without checking the length. Read more
Source§

fn read(token: Self::Token, from: &[Self::Scalar]) -> Self

Read from a slice. Read more
Source§

unsafe fn write_ptr(self, to: *mut Self::Scalar)

Write to a pointer. Read more
Source§

unsafe fn write_aligned_ptr(self, to: *mut Self::Scalar)

Write to a pointer. Read more
Source§

unsafe fn write_unchecked(self, to: &mut [Self::Scalar])

Write to a slice without checking the length. Read more
Source§

fn write(self, to: &mut [Self::Scalar])

Write to a slice. Read more
Source§

impl<Underlying: Copy, Scalar: Copy, Token: Copy> Copy for ShimToken<Underlying, Scalar, Token>

Auto Trait Implementations§

§

impl<Underlying, Scalar, Token> Freeze for ShimToken<Underlying, Scalar, Token>
where Underlying: Freeze,

§

impl<Underlying, Scalar, Token> RefUnwindSafe for ShimToken<Underlying, Scalar, Token>
where Underlying: RefUnwindSafe, Scalar: RefUnwindSafe, Token: RefUnwindSafe,

§

impl<Underlying, Scalar, Token> Send for ShimToken<Underlying, Scalar, Token>
where Underlying: Send, Scalar: Send, Token: Send,

§

impl<Underlying, Scalar, Token> Sync for ShimToken<Underlying, Scalar, Token>
where Underlying: Sync, Scalar: Sync, Token: Sync,

§

impl<Underlying, Scalar, Token> Unpin for ShimToken<Underlying, Scalar, Token>
where Underlying: Unpin, Scalar: Unpin, Token: Unpin,

§

impl<Underlying, Scalar, Token> UnwindSafe for ShimToken<Underlying, Scalar, Token>
where Underlying: UnwindSafe, Scalar: UnwindSafe, Token: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V> Ops for V
where V: Add<<V as Vector>::Scalar, Output = V, Output = V> + AsRef<[<V as Vector>::Scalar]> + AddAssign + AddAssign<<V as Vector>::Scalar> + Sub<Output = V, Output = V> + AsMut<[<V as Vector>::Scalar]> + Sub<<V as Vector>::Scalar> + Deref<Target = [<V as Vector>::Scalar]> + SubAssign + SubAssign<<V as Vector>::Scalar> + Mul<Output = V, Output = V> + Mul<<V as Vector>::Scalar> + DerefMut + MulAssign + MulAssign<<V as Vector>::Scalar> + Div<Output = V, Output = V> + Add + Div<<V as Vector>::Scalar> + Vector + DivAssign + DivAssign<<V as Vector>::Scalar>,

Source§

impl<V> Signed for V
where V: Ops + Neg<Output = V>,