Skip to main content

u32x4

Struct u32x4 

Source
pub struct u32x4<S: Simd> {
    pub simd: S,
    /* private fields */
}
Expand description

A SIMD vector of 4 u32 elements.

You may construct this vector type using the Self::splat, Self::from_slice, Self::simd_from, Self::from_fn, and Self::block_splat methods.

fn construct_simd<S: Simd>(simd: S) {
    // From a single scalar value:
    let a = u32x4::splat(simd, 1);
    let b = u32x4::simd_from(simd, 1);

    // From a slice:
    let c = u32x4::from_slice(simd, &[1, 2, 3, 4]);

    // From an array:
    let d = u32x4::simd_from(simd, [1, 2, 3, 4]);

    // From an element-wise function:
    let e = u32x4::from_fn(simd, |i| i as u32);
}

Fields§

§simd: S

Trait Implementations§

Source§

impl<S: Simd> Add for u32x4<S>

Source§

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

Add two vectors element-wise, wrapping on overflow.

Source§

type Output = u32x4<S>

The resulting type after applying the + operator.
Source§

impl<S: Simd> Add<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl<S: Simd> Add<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u32x4<S>) -> Self::Output

Performs the + operation. Read more
Source§

impl<S: Simd> AddAssign for u32x4<S>

Source§

fn add_assign(&mut self, rhs: Self)

Add two vectors element-wise, wrapping on overflow.

Source§

impl<S: Simd> AddAssign<u32> for u32x4<S>

Source§

fn add_assign(&mut self, rhs: u32)

Performs the += operation. Read more
Source§

impl<S: Simd> BitAnd for u32x4<S>

Source§

fn bitand(self, rhs: Self) -> Self::Output

Compute the bitwise AND of two vectors.

Source§

type Output = u32x4<S>

The resulting type after applying the & operator.
Source§

impl<S: Simd> BitAnd<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: u32) -> Self::Output

Performs the & operation. Read more
Source§

impl<S: Simd> BitAnd<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: u32x4<S>) -> Self::Output

Performs the & operation. Read more
Source§

impl<S: Simd> BitAndAssign for u32x4<S>

Source§

fn bitand_assign(&mut self, rhs: Self)

Compute the bitwise AND of two vectors.

Source§

impl<S: Simd> BitAndAssign<u32> for u32x4<S>

Source§

fn bitand_assign(&mut self, rhs: u32)

Performs the &= operation. Read more
Source§

impl<S: Simd> BitOr for u32x4<S>

Source§

fn bitor(self, rhs: Self) -> Self::Output

Compute the bitwise OR of two vectors.

Source§

type Output = u32x4<S>

The resulting type after applying the | operator.
Source§

impl<S: Simd> BitOr<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: u32) -> Self::Output

Performs the | operation. Read more
Source§

impl<S: Simd> BitOr<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: u32x4<S>) -> Self::Output

Performs the | operation. Read more
Source§

impl<S: Simd> BitOrAssign for u32x4<S>

Source§

fn bitor_assign(&mut self, rhs: Self)

Compute the bitwise OR of two vectors.

Source§

impl<S: Simd> BitOrAssign<u32> for u32x4<S>

Source§

fn bitor_assign(&mut self, rhs: u32)

Performs the |= operation. Read more
Source§

impl<S: Simd> BitXor for u32x4<S>

Source§

fn bitxor(self, rhs: Self) -> Self::Output

Compute the bitwise XOR of two vectors.

Source§

type Output = u32x4<S>

The resulting type after applying the ^ operator.
Source§

impl<S: Simd> BitXor<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: u32) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<S: Simd> BitXor<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: u32x4<S>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<S: Simd> BitXorAssign for u32x4<S>

Source§

fn bitxor_assign(&mut self, rhs: Self)

Compute the bitwise XOR of two vectors.

Source§

impl<S: Simd> BitXorAssign<u32> for u32x4<S>

Source§

fn bitxor_assign(&mut self, rhs: u32)

Performs the ^= operation. Read more
Source§

impl<S: Simd> Bytes for u32x4<S>

Source§

type Bytes = u8x16<S>

The same-width SIMD vector of u8 lanes used as the byte representation. Read more
Source§

fn to_bytes(self) -> Self::Bytes

Reinterpret this vector as a same-width vector of u8 lanes.
Source§

fn from_bytes(value: Self::Bytes) -> Self

Reinterpret a same-width vector of u8 lanes as this vector type.
Source§

fn bitcast<U: Bytes<Bytes = Self::Bytes>>(self) -> U

Bitcast directly to another SIMD vector with the same byte representation. This is effectively a safe transmute for SIMD types. Read more
Source§

impl<S: Clone + Simd> Clone for u32x4<S>
where S::u32x4: Clone,

Source§

fn clone(&self) -> u32x4<S>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<S: Copy + Simd> Copy for u32x4<S>
where S::u32x4: Copy,

Source§

impl<S: Simd + Debug> Debug for u32x4<S>

Source§

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

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

impl<S: Simd> Deref for u32x4<S>

Source§

type Target = [u32; 4]

The resulting type after dereferencing.
Source§

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

Dereferences the value.
Source§

impl<S: Simd> DerefMut for u32x4<S>

Source§

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

Mutably dereferences the value.
Source§

impl<S: Simd> From<u32x4<S>> for [u32; 4]

Source§

fn from(value: u32x4<S>) -> Self

Converts to this type from the input type.
Source§

impl<S: Simd> From<u32x4<S>> for __m128i

Available on x86 or x86-64 only.
Source§

fn from(value: u32x4<S>) -> Self

Converts to this type from the input type.
Source§

impl<S: Simd> Index<usize> for u32x4<S>

Source§

type Output = u32

The returned type after indexing.
Source§

fn index(&self, i: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<S: Simd> IndexMut<usize> for u32x4<S>

Source§

fn index_mut(&mut self, i: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl<S: Simd> Mul for u32x4<S>

Source§

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

Multiply two vectors element-wise, wrapping on overflow.

Source§

type Output = u32x4<S>

The resulting type after applying the * operator.
Source§

impl<S: Simd> Mul<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl<S: Simd> Mul<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: u32x4<S>) -> Self::Output

Performs the * operation. Read more
Source§

impl<S: Simd> MulAssign for u32x4<S>

Source§

fn mul_assign(&mut self, rhs: Self)

Multiply two vectors element-wise, wrapping on overflow.

Source§

impl<S: Simd> MulAssign<u32> for u32x4<S>

Source§

fn mul_assign(&mut self, rhs: u32)

Performs the *= operation. Read more
Source§

impl<S: Simd> Not for u32x4<S>

Source§

fn not(self) -> Self::Output

Compute the bitwise NOT of the vector.

Source§

type Output = u32x4<S>

The resulting type after applying the ! operator.
Source§

impl<S: Simd> Select<u32x4<S>> for mask32x4<S>

Source§

fn select(self, if_true: u32x4<S>, if_false: u32x4<S>) -> u32x4<S>

For each logical lane of this mask, select the first operand if the lane is true, and select the second operand if the lane is false. Read more
Source§

impl<S: Simd> Shl for u32x4<S>

Source§

fn shl(self, rhs: Self) -> Self::Output

Shift each element left by the given number of bits.

Bits shifted out of the left side are discarded, and zeros are shifted in on the right.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

This operation is not implemented in hardware on all platforms. On WebAssembly, and on x86 platforms without AVX2, this will use a fallback scalar implementation.

Source§

type Output = u32x4<S>

The resulting type after applying the << operator.
Source§

impl<S: Simd> Shl<u32> for u32x4<S>

Source§

fn shl(self, rhs: u32) -> Self::Output

Shift each element left by the given number of bits.

Bits shifted out of the left side are discarded, and zeros are shifted in on the right.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

Source§

type Output = u32x4<S>

The resulting type after applying the << operator.
Source§

impl<S: Simd> ShlAssign for u32x4<S>

Source§

fn shl_assign(&mut self, rhs: Self)

Shift each element left by the given number of bits.

Bits shifted out of the left side are discarded, and zeros are shifted in on the right.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

This operation is not implemented in hardware on all platforms. On WebAssembly, and on x86 platforms without AVX2, this will use a fallback scalar implementation.

Source§

impl<S: Simd> ShlAssign<u32> for u32x4<S>

Source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
Source§

impl<S: Simd> Shr for u32x4<S>

Source§

fn shr(self, rhs: Self) -> Self::Output

Shift each element right by the corresponding element in another vector.

For unsigned integers, zeros are shifted in on the left. For signed integers, the sign bit is replicated.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

This operation is not implemented in hardware on all platforms. On WebAssembly, and on x86 platforms without AVX2, this will use a fallback scalar implementation.

Source§

type Output = u32x4<S>

The resulting type after applying the >> operator.
Source§

impl<S: Simd> Shr<u32> for u32x4<S>

Source§

fn shr(self, rhs: u32) -> Self::Output

Shift each element right by the given number of bits.

For unsigned integers, zeros are shifted in on the left. For signed integers, the sign bit is replicated.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

Source§

type Output = u32x4<S>

The resulting type after applying the >> operator.
Source§

impl<S: Simd> ShrAssign for u32x4<S>

Source§

fn shr_assign(&mut self, rhs: Self)

Shift each element right by the corresponding element in another vector.

For unsigned integers, zeros are shifted in on the left. For signed integers, the sign bit is replicated.

When shifting out of bounds (e.g. shifting a 32-bit value by 32 or more), the result is implementation-defined and may vary by platform.

This operation is not implemented in hardware on all platforms. On WebAssembly, and on x86 platforms without AVX2, this will use a fallback scalar implementation.

Source§

impl<S: Simd> ShrAssign<u32> for u32x4<S>

Source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
Source§

impl<S: Simd> SimdBase<S> for u32x4<S>

Source§

const N: usize = 4

This vector type’s lane count. This is useful when you’re working with a native-width vector (e.g. Simd::f32s) and want to process data in native-width chunks.
Source§

type Element = u32

The type of this vector’s elements.
Source§

type ByteVector = u8x16<S>

The same-width SIMD vector of u8 lanes used as the byte representation. Read more
Source§

type Mask = mask32x4<S>

A SIMD vector mask with the same number of logical lanes. Read more
Source§

type Block = u32x4<S>

A 128-bit SIMD vector of the same scalar type.
Source§

type Array = [u32; 4]

The array type that this vector type corresponds to, which will always be [Self::Element; Self::N]. It has the same layout as this vector type, but likely has a lower alignment.
Source§

fn witness(&self) -> S

Get the Simd implementation associated with this type.
Source§

fn as_slice(&self) -> &[u32]

Source§

fn as_mut_slice(&mut self) -> &mut [u32]

Source§

fn from_slice(simd: S, slice: &[u32]) -> Self

Create a SIMD vector from a slice. Read more
Source§

fn store_slice(&self, slice: &mut [u32])

Store a SIMD vector into a slice. Read more
Source§

fn splat(simd: S, val: u32) -> Self

Create a SIMD vector with all elements set to the given value.
Source§

fn block_splat(block: Self::Block) -> Self

Create a SIMD vector from a 128-bit vector of the same scalar type, repeated.
Source§

fn from_fn(simd: S, f: impl FnMut(usize) -> u32) -> Self

Create a SIMD vector where each element is produced by calling f with that element’s lane index (from 0 to SimdBase::N - 1).
Source§

fn slide<const SHIFT: usize>(self, rhs: impl SimdInto<Self, S>) -> Self

Concatenate [self, rhs] and extract Self::N elements starting at index SHIFT. Read more
Source§

fn slide_within_blocks<const SHIFT: usize>( self, rhs: impl SimdInto<Self, S>, ) -> Self

Like slide, but operates independently on each 128-bit block.
Source§

fn swizzle_dyn_within_blocks( self, indices: impl SimdInto<Self::Bytes, S>, ) -> Self

Dynamically swizzle this vector’s bytes independently within each 128-bit block. Read more
Source§

fn swizzle_dyn(self, indices: impl SimdInto<Self::Bytes, S>) -> Self

Dynamically swizzle this vector’s bytes across the whole vector. Read more
Source§

fn swizzle_dyn_precise(self, indices: impl SimdInto<Self::Bytes, S>) -> Self

Dynamically swizzle this vector’s bytes across the whole vector. Read more
Source§

fn max(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise maximum of two vectors. Read more
Source§

fn min(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise minimum of two vectors. Read more
Source§

fn max_precise(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise maximum of two vectors. Read more
Source§

fn min_precise(self, rhs: impl SimdInto<Self, S>) -> Self

Return the element-wise minimum of two vectors. Read more
Source§

fn simd_eq(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for equality. Read more
Source§

fn simd_lt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for less than. Read more
Source§

fn simd_le(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for less than or equal. Read more
Source§

fn simd_ge(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for greater than or equal. Read more
Source§

fn simd_gt(self, rhs: impl SimdInto<Self, S>) -> Self::Mask

Compare two vectors element-wise for greater than. Read more
Source§

fn zip_low(self, rhs: impl SimdInto<Self, S>) -> Self

Interleave the lower half elements of two vectors. Read more
Source§

fn zip_high(self, rhs: impl SimdInto<Self, S>) -> Self

Interleave the upper half elements of two vectors. Read more
Source§

fn unzip_low(self, rhs: impl SimdInto<Self, S>) -> Self

Extract even-indexed elements from two vectors. Read more
Source§

fn unzip_high(self, rhs: impl SimdInto<Self, S>) -> Self

Extract odd-indexed elements from two vectors. Read more
Source§

fn interleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)

Interleave two vectors. Read more
Source§

fn deinterleave(self, rhs: impl SimdInto<Self, S>) -> (Self, Self)

Deinterleave two vectors. Read more
Source§

fn load_array(simd: S, val: Self::Array) -> Self

Create a SIMD vector from its corresponding lane array.
Source§

fn load_array_ref(simd: S, val: &Self::Array) -> Self

Create a SIMD vector from a reference to its corresponding lane array.
Source§

fn as_array(self) -> Self::Array

Convert this SIMD vector to its corresponding lane array.
Source§

fn as_array_ref(&self) -> &Self::Array

Project this SIMD vector reference to its corresponding lane array reference.
Source§

fn as_array_mut(&mut self) -> &mut Self::Array

Project this mutable SIMD vector reference to its corresponding mutable lane array reference.
Source§

fn store_array(self, dest: &mut Self::Array)

Store this SIMD vector into its corresponding lane array.
Source§

fn rotate_elements_left<const OFFSET: usize>(self) -> Self

Rotate the vector elements to the left by OFFSET. Read more
Source§

fn rotate_elements_right<const OFFSET: usize>(self) -> Self

Rotate the vector elements to the right by OFFSET. Read more
Source§

fn shift_elements_left<const OFFSET: usize>( self, padding: Self::Element, ) -> Self

Shift the vector elements to the left by OFFSET, filling in with padding from the right. Read more
Source§

fn shift_elements_right<const OFFSET: usize>( self, padding: Self::Element, ) -> Self

Shift the vector elements to the right by OFFSET, filling in with padding from the left. Read more
Source§

impl<S: Simd> SimdCombine<S> for u32x4<S>

Source§

type Combined = u32x8<S>

Source§

fn combine(self, rhs: impl SimdInto<Self, S>) -> Self::Combined

Concatenate two vectors into a new one that’s twice as long.
Source§

impl<S: Simd> SimdCvtFloat<u32x4<S>> for f32x4<S>

Source§

fn float_from(x: u32x4<S>) -> Self

Convert each unsigned 32-bit integer element to a floating-point value.

Values that cannot be exactly represented are rounded to the nearest representable value.

Source§

impl<S: Simd> SimdCvtTruncate<f32x4<S>> for u32x4<S>

Source§

fn truncate_from(x: f32x4<S>) -> Self

Convert each floating-point element to an unsigned 32-bit integer, truncating towards zero.

Out-of-range values or NaN will produce implementation-defined results.

On x86 platforms below AVX-512, this operation will still be slower than converting to i32, because there is no native instruction for converting to u32. If you know your values fit within range of an i32, you should convert to an i32 and cast to your desired datatype afterwards.

Source§

fn truncate_from_precise(x: f32x4<S>) -> Self

Convert each floating-point element to an unsigned 32-bit integer, truncating towards zero.

Out-of-range values are saturated to the closest in-range value. NaN becomes 0.

Source§

impl<S: Simd> SimdFrom<[u32; 4], S> for u32x4<S>

Source§

fn simd_from(simd: S, val: [u32; 4]) -> Self

Source§

impl<S: Simd> SimdFrom<__m128i, S> for u32x4<S>

Available on x86 or x86-64 only.
Source§

fn simd_from(simd: S, arch: __m128i) -> Self

Source§

impl<S: Simd> SimdFrom<u32, S> for u32x4<S>

Source§

fn simd_from(simd: S, value: u32) -> Self

Source§

impl<S: Simd> SimdInt<S> for u32x4<S>

Source§

fn to_float<T: SimdCvtFloat<Self>>(self) -> T

Convert this integer type to a floating-point type. This is a convenience method that delegates to SimdCvtFloat::float_from, and can only be called if there actually exists a target type of the same bit width (f32 or f64).
Source§

impl<S: Simd> SimdInterleaved<S> for u32x4<S>

Source§

fn load_four_interleaved(simd: S, src: &[Self::Element]) -> [Self; 4]

Load four 128-bit vectors from a slice with 4-way interleaving. Read more
Source§

fn store_four_interleaved(vectors: [Self; 4], dest: &mut [Self::Element])

Store four vectors into a scalar slice with four-way interleaving. Read more
Source§

impl<S: Simd> SimdNarrow<S> for u32x4<S>

Source§

type Narrowed = u16x8<S>

The same-width vector type with lanes half as wide.
Source§

fn narrow(self, high: Self) -> Self::Narrowed

Narrow every lane. Read more
Source§

fn saturating_narrow(self, high: Self) -> Self::Narrowed

Narrow with saturation for integers. Floats behave identically to narrow. Read more
Source§

fn relaxed_narrow(self, high: Self) -> Self::Narrowed

Narrow using the cheapest operation for the active SIMD backend, assuming no overflow. Read more
Source§

impl<S: Simd> SimdWiden<S> for u32x4<S>

Source§

type Widened = u64x2<S>

The same-width vector type with lanes twice as wide.
Source§

fn widen(self) -> (Self::Widened, Self::Widened)

Widen every lane, returning the lower and upper halves in that order.
Source§

impl<S: Simd> Sub for u32x4<S>

Source§

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

Subtract two vectors element-wise, wrapping on overflow.

Source§

type Output = u32x4<S>

The resulting type after applying the - operator.
Source§

impl<S: Simd> Sub<u32> for u32x4<S>

Source§

type Output = u32x4<S>

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl<S: Simd> Sub<u32x4<S>> for u32

Source§

type Output = u32x4<S>

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: u32x4<S>) -> Self::Output

Performs the - operation. Read more
Source§

impl<S: Simd> SubAssign for u32x4<S>

Source§

fn sub_assign(&mut self, rhs: Self)

Subtract two vectors element-wise, wrapping on overflow.

Source§

impl<S: Simd> SubAssign<u32> for u32x4<S>

Source§

fn sub_assign(&mut self, rhs: u32)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<S> Freeze for u32x4<S>
where <S as ArchTypes>::u32x4: Freeze, S: Freeze,

§

impl<S> RefUnwindSafe for u32x4<S>
where <S as ArchTypes>::u32x4: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S> Send for u32x4<S>

§

impl<S> Sync for u32x4<S>

§

impl<S> Unpin for u32x4<S>
where <S as ArchTypes>::u32x4: Unpin, S: Unpin,

§

impl<S> UnsafeUnpin for u32x4<S>
where <S as ArchTypes>::u32x4: UnsafeUnpin, S: UnsafeUnpin,

§

impl<S> UnwindSafe for u32x4<S>
where <S as ArchTypes>::u32x4: UnwindSafe, S: 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, S> SimdFrom<T, S> for T
where S: Simd,

Source§

fn simd_from(_simd: S, value: T) -> T

Source§

impl<F, T, S> SimdInto<T, S> for F
where T: SimdFrom<F, S>, S: Simd,

Source§

fn simd_into(self, simd: S) -> T

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.