Skip to main content

Vec3

Struct Vec3 

Source
#[repr(C)]
pub struct Vec3 { pub x: f32, pub y: f32, pub z: f32, }
Expand description

A 3-dimensional vector.

Fields§

§x: f32§y: f32§z: f32

Implementations§

Source§

impl Vec3

Source

pub const ZERO: Vec3

All zeroes.

Source

pub const ONE: Vec3

All ones.

Source

pub const NEG_ONE: Vec3

All negative ones.

Source

pub const MIN: Vec3

All f32::MIN.

Source

pub const MAX: Vec3

All f32::MAX.

Source

pub const NAN: Vec3

All f32::NAN.

Source

pub const INFINITY: Vec3

All f32::INFINITY.

Source

pub const NEG_INFINITY: Vec3

All f32::NEG_INFINITY.

Source

pub const X: Vec3

A unit vector pointing along the positive X axis.

Source

pub const Y: Vec3

A unit vector pointing along the positive Y axis.

Source

pub const Z: Vec3

A unit vector pointing along the positive Z axis.

Source

pub const NEG_X: Vec3

A unit vector pointing along the negative X axis.

Source

pub const NEG_Y: Vec3

A unit vector pointing along the negative Y axis.

Source

pub const NEG_Z: Vec3

A unit vector pointing along the negative Z axis.

Source

pub const AXES: [Vec3; 3]

The unit axes.

Source

pub const USES_CORE_SIMD: bool = false

Vec3 uses Rust Portable SIMD

Source

pub const USES_NEON: bool = false

Vec3 uses Arm NEON

Source

pub const USES_SCALAR_MATH: bool = true

Vec3 uses scalar math

Source

pub const USES_SSE2: bool = false

Vec3 uses Intel SSE2

Source

pub const USES_WASM_SIMD: bool = false

Vec3 uses WebAssembly 128-bit SIMD

Source

pub const USES_WASM32_SIMD: bool = false

👎Deprecated since 0.31.0:

Renamed to USES_WASM_SIMD

Source

pub const fn new(x: f32, y: f32, z: f32) -> Vec3

Creates a new vector.

Source

pub const fn splat(v: f32) -> Vec3

Creates a vector with all elements set to v.

Source

pub fn map<F>(self, f: F) -> Vec3
where F: Fn(f32) -> f32,

Returns a vector containing each element of self modified by a mapping function f.

Source

pub fn select(mask: BVec3, if_true: Vec3, if_false: Vec3) -> Vec3

Creates a vector from the elements in if_true and if_false, selecting which to use for each element of self.

A true element in the mask uses the corresponding element from if_true, and false uses the element from if_false.

Source

pub const fn from_array(a: [f32; 3]) -> Vec3

Creates a new vector from an array.

Source

pub const fn to_array(&self) -> [f32; 3]

Converts self to [x, y, z]

Source

pub const fn from_slice(slice: &[f32]) -> Vec3

Creates a vector from the first 3 values in slice.

§Panics

Panics if slice is less than 3 elements long.

Source

pub fn write_to_slice(self, slice: &mut [f32])

Writes the elements of self to the first 3 elements in slice.

§Panics

Panics if slice is less than 3 elements long.

Source

pub fn extend(self, w: f32) -> Vec4

Creates a 4D vector from self and the given w value.

Source

pub fn truncate(self) -> Vec2

Creates a 2D vector from the x and y elements of self, discarding z.

Truncation may also be performed by using self.xy().

Source

pub fn from_homogeneous(v: Vec4) -> Vec3

Projects a homogeneous coordinate to 3D space by performing perspective divide.

§Panics

Will panic if v.w is 0 when glam_assert is enabled.

Source

pub fn to_homogeneous(self) -> Vec4

Creates a homogeneous coordinate from self, equivalent to self.extend(1.0).

Source

pub fn to_vec3a(self) -> Vec3A

Source

pub fn with_x(self, x: f32) -> Vec3

Creates a 3D vector from self with the given value of x.

Source

pub fn with_y(self, y: f32) -> Vec3

Creates a 3D vector from self with the given value of y.

Source

pub fn with_z(self, z: f32) -> Vec3

Creates a 3D vector from self with the given value of z.

Source

pub fn dot(self, rhs: Vec3) -> f32

Computes the dot product of self and rhs.

Source

pub fn dot_into_vec(self, rhs: Vec3) -> Vec3

Returns a vector where every component is the dot product of self and rhs.

Source

pub fn cross(self, rhs: Vec3) -> Vec3

Computes the cross product of self and rhs.

Source

pub fn min(self, rhs: Vec3) -> Vec3

Returns a vector containing the minimum values for each element of self and rhs.

In other words this computes [min(x, rhs.x), min(self.y, rhs.y), ..].

NaN propogation does not follow IEEE 754-2008 semantics for minNum and may differ on different SIMD architectures.

Source

pub fn max(self, rhs: Vec3) -> Vec3

Returns a vector containing the maximum values for each element of self and rhs.

In other words this computes [max(self.x, rhs.x), max(self.y, rhs.y), ..].

NaN propogation does not follow IEEE 754-2008 semantics for maxNum and may differ on different SIMD architectures.

Source

pub fn clamp(self, min: Vec3, max: Vec3) -> Vec3

Component-wise clamping of values, similar to f32::clamp.

Each element in min must be less-or-equal to the corresponding element in max.

NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.

§Panics

Will panic if min is greater than max when glam_assert is enabled.

Source

pub fn min_element(self) -> f32

Returns the horizontal minimum of self.

In other words this computes min(x, y, ..).

NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.

Source

pub fn max_element(self) -> f32

Returns the horizontal maximum of self.

In other words this computes max(x, y, ..).

NaN propogation does not follow IEEE 754-2008 semantics and may differ on different SIMD architectures.

Source

pub fn min_position(self) -> usize

Returns the index of the first minimum element of self.

Source

pub fn max_position(self) -> usize

Returns the index of the first maximum element of self.

Source

pub fn element_sum(self) -> f32

Returns the sum of all elements of self.

In other words, this computes self.x + self.y + ...

Source

pub fn element_product(self) -> f32

Returns the product of all elements of self.

In other words, this computes self.x * self.y * ...

Source

pub fn cmpeq(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a == comparison for each element of self and rhs.

In other words, this computes [self.x == rhs.x, self.y == rhs.y, ..] for all elements.

Source

pub fn cmpne(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a != comparison for each element of self and rhs.

In other words this computes [self.x != rhs.x, self.y != rhs.y, ..] for all elements.

Source

pub fn cmpge(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a >= comparison for each element of self and rhs.

In other words this computes [self.x >= rhs.x, self.y >= rhs.y, ..] for all elements.

Source

pub fn cmpgt(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a > comparison for each element of self and rhs.

In other words this computes [self.x > rhs.x, self.y > rhs.y, ..] for all elements.

Source

pub fn cmple(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a <= comparison for each element of self and rhs.

In other words this computes [self.x <= rhs.x, self.y <= rhs.y, ..] for all elements.

Source

pub fn cmplt(self, rhs: Vec3) -> BVec3

Returns a vector mask containing the result of a < comparison for each element of self and rhs.

In other words this computes [self.x < rhs.x, self.y < rhs.y, ..] for all elements.

Source

pub fn abs(self) -> Vec3

Returns a vector containing the absolute value of each element of self.

Source

pub fn signum(self) -> Vec3

Returns a vector with elements representing the sign of self.

  • 1.0 if the number is positive, +0.0 or INFINITY
  • -1.0 if the number is negative, -0.0 or NEG_INFINITY
  • NAN if the number is NAN
Source

pub fn copysign(self, rhs: Vec3) -> Vec3

Returns a vector with signs of rhs and the magnitudes of self.

Source

pub fn is_negative_bitmask(self) -> u32

Returns a bitmask with the lowest 3 bits set to the sign bits from the elements of self.

A negative element results in a 1 bit and a positive element in a 0 bit. Element x goes into the first lowest bit, element y into the second, etc.

An element is negative if it has a negative sign, including -0.0, NaNs with negative sign bit and negative infinity.

Source

pub fn is_finite(self) -> bool

Returns true if, and only if, all elements are finite. If any element is either NaN, positive or negative infinity, this will return false.

Source

pub fn is_finite_mask(self) -> BVec3

Performs is_finite on each element of self, returning a vector mask of the results.

In other words, this computes [x.is_finite(), y.is_finite(), ...].

Source

pub fn is_nan(self) -> bool

Returns true if any elements are NaN.

Source

pub fn is_nan_mask(self) -> BVec3

Performs is_nan on each element of self, returning a vector mask of the results.

In other words, this computes [x.is_nan(), y.is_nan(), ...].

Source

pub fn length(self) -> f32

Computes the length of self.

Source

pub fn length_squared(self) -> f32

Computes the squared length of self.

This is faster than length() as it avoids a square root operation.

Source

pub fn length_recip(self) -> f32

Computes 1.0 / length().

For valid results, self must not be of length zero.

Source

pub fn distance(self, rhs: Vec3) -> f32

Computes the Euclidean distance between two points in space.

Source

pub fn distance_squared(self, rhs: Vec3) -> f32

Compute the squared euclidean distance between two points in space.

Source

pub fn div_euclid(self, rhs: Vec3) -> Vec3

Returns the element-wise quotient of [Euclidean division] of self by rhs.

Source

pub fn rem_euclid(self, rhs: Vec3) -> Vec3

Returns the element-wise remainder of Euclidean division of self by rhs.

Source

pub fn normalize(self) -> Vec3

Returns self normalized to length 1.0.

For valid results, self must be finite and not of length zero, nor very close to zero.

See also Self::try_normalize() and Self::normalize_or_zero().

§Panics

Will panic if the resulting normalized vector is not finite when glam_assert is enabled.

Source

pub fn try_normalize(self) -> Option<Vec3>

Returns self normalized to length 1.0 if possible, else returns None.

In particular, if the input is zero (or very close to zero), or non-finite, the result of this operation will be None.

See also Self::normalize_or_zero().

Source

pub fn normalize_or(self, fallback: Vec3) -> Vec3

Returns self normalized to length 1.0 if possible, else returns a fallback value.

In particular, if the input is zero (or very close to zero), or non-finite, the result of this operation will be the fallback value.

See also Self::try_normalize().

Source

pub fn normalize_or_zero(self) -> Vec3

Returns self normalized to length 1.0 if possible, else returns zero.

In particular, if the input is zero (or very close to zero), or non-finite, the result of this operation will be zero.

See also Self::try_normalize().

Source

pub fn normalize_and_length(self) -> (Vec3, f32)

Returns self normalized to length 1.0 and the length of self.

If self is zero length then (Self::X, 0.0) is returned.

Source

pub fn is_normalized(self) -> bool

Returns whether self is length 1.0 or not.

Uses a precision threshold of approximately 1e-4.

Source

pub fn project_onto(self, rhs: Vec3) -> Vec3

Returns the vector projection of self onto rhs.

rhs must be of non-zero length.

§Panics

Will panic if rhs is zero length when glam_assert is enabled.

Source

pub fn reject_from(self, rhs: Vec3) -> Vec3

Returns the vector rejection of self from rhs.

The vector rejection is the vector perpendicular to the projection of self onto rhs, in rhs words the result of self - self.project_onto(rhs).

rhs must be of non-zero length.

§Panics

Will panic if rhs has a length of zero when glam_assert is enabled.

Source

pub fn project_onto_normalized(self, rhs: Vec3) -> Vec3

Returns the vector projection of self onto rhs.

rhs must be normalized.

§Panics

Will panic if rhs is not normalized when glam_assert is enabled.

Source

pub fn reject_from_normalized(self, rhs: Vec3) -> Vec3

Returns the vector rejection of self from rhs.

The vector rejection is the vector perpendicular to the projection of self onto rhs, in rhs words the result of self - self.project_onto(rhs).

rhs must be normalized.

§Panics

Will panic if rhs is not normalized when glam_assert is enabled.

Source

pub fn round(self) -> Vec3

Returns a vector containing the nearest integer to a number for each element of self. Round half-way cases away from 0.0.

Source

pub fn floor(self) -> Vec3

Returns a vector containing the largest integer less than or equal to a number for each element of self.

Source

pub fn ceil(self) -> Vec3

Returns a vector containing the smallest integer greater than or equal to a number for each element of self.

Source

pub fn trunc(self) -> Vec3

Returns a vector containing the integer part each element of self. This means numbers are always truncated towards zero.

Source

pub fn step(self, rhs: Vec3) -> Vec3

Returns a vector containing 0.0 if rhs < self and 1.0 otherwise.

Similar to glsl’s step(edge, x), which translates into edge.step(x)

Source

pub fn saturate(self) -> Vec3

Returns a vector containing all elements of self clamped to the range of [0, 1].

Source

pub fn fract(self) -> Vec3

Returns a vector containing the fractional part of the vector as self - self.trunc().

Note that this differs from the GLSL implementation of fract which returns self - self.floor().

Note that this is fast but not precise for large numbers.

Source

pub fn fract_gl(self) -> Vec3

Returns a vector containing the fractional part of the vector as self - self.floor().

Note that this differs from the Rust implementation of fract which returns self - self.trunc().

Note that this is fast but not precise for large numbers.

Source

pub fn exp(self) -> Vec3

Returns a vector containing e^self (the exponential function) for each element of self.

Source

pub fn exp2(self) -> Vec3

Returns a vector containing 2^self for each element of self.

Source

pub fn ln(self) -> Vec3

Returns a vector containing the natural logarithm for each element of self. This returns NaN when the element is negative and negative infinity when the element is zero.

Source

pub fn log2(self) -> Vec3

Returns a vector containing the base 2 logarithm for each element of self. This returns NaN when the element is negative and negative infinity when the element is zero.

Source

pub fn powf(self, n: f32) -> Vec3

Returns a vector containing each element of self raised to the power of n.

Source

pub fn sqrt(self) -> Vec3

Returns a vector containing the square root for each element of self. This returns NaN when the element is negative.

Source

pub fn cos(self) -> Vec3

Returns a vector containing the cosine for each element of self.

Source

pub fn sin(self) -> Vec3

Returns a vector containing the sine for each element of self.

Source

pub fn sin_cos(self) -> (Vec3, Vec3)

Returns a tuple of two vectors containing the sine and cosine for each element of self.

Source

pub fn recip(self) -> Vec3

Returns a vector containing the reciprocal 1.0/n of each element of self.

Source

pub fn lerp(self, rhs: Vec3, s: f32) -> Vec3

Performs a linear interpolation between self and rhs based on the value s.

When s is 0.0, the result will be equal to self. When s is 1.0, the result will be equal to rhs. When s is outside of range [0, 1], the result is linearly extrapolated.

Source

pub fn move_towards(self, rhs: Vec3, d: f32) -> Vec3

Moves towards rhs based on the value d.

When d is 0.0, the result will be equal to self. When d is equal to self.distance(rhs), the result will be equal to rhs. Will not go past rhs.

Source

pub fn midpoint(self, rhs: Vec3) -> Vec3

Calculates the midpoint between self and rhs.

The midpoint is the average of, or halfway point between, two vectors. a.midpoint(b) should yield the same result as a.lerp(b, 0.5) while being slightly cheaper to compute.

Source

pub fn abs_diff_eq(self, rhs: Vec3, max_abs_diff: f32) -> bool

Returns true if the absolute difference of all elements between self and rhs is less than or equal to max_abs_diff.

This can be used to compare if two vectors contain similar elements. It works best when comparing with a known value. The max_abs_diff that should be used used depends on the values being compared against.

For more see comparing floating point numbers.

Source

pub fn clamp_length(self, min: f32, max: f32) -> Vec3

Returns a vector with a length no less than min and no more than max.

§Panics

Will panic if min is greater than max, or if either min or max is negative, when glam_assert is enabled.

Source

pub fn clamp_length_max(self, max: f32) -> Vec3

Returns a vector with a length no more than max.

§Panics

Will panic if max is negative when glam_assert is enabled.

Source

pub fn clamp_length_min(self, min: f32) -> Vec3

Returns a vector with a length no less than min.

§Panics

Will panic if min is negative when glam_assert is enabled.

Source

pub fn mul_add(self, a: Vec3, b: Vec3) -> Vec3

Fused multiply-add. Computes (self * a) + b element-wise with only one rounding error, yielding a more accurate result than an unfused multiply-add.

Using mul_add may be more performant than an unfused multiply-add if the target architecture has a dedicated fma CPU instruction. However, this is not always true, and will be heavily dependant on designing algorithms with specific target hardware in mind.

Source

pub fn reflect(self, normal: Vec3) -> Vec3

Returns the reflection vector for a given incident vector self and surface normal normal.

normal must be normalized.

§Panics

Will panic if normal is not normalized when glam_assert is enabled.

Source

pub fn refract(self, normal: Vec3, eta: f32) -> Vec3

Returns the refraction direction for a given incident vector self, surface normal normal and ratio of indices of refraction, eta. When total internal reflection occurs, a zero vector will be returned.

self and normal must be normalized.

§Panics

Will panic if self or normal is not normalized when glam_assert is enabled.

Source

pub fn angle_between(self, rhs: Vec3) -> f32

Returns the angle (in radians) between two vectors in the range [0, +π].

The inputs do not need to be unit vectors however they must be non-zero.

Source

pub fn rotate_x(self, angle: f32) -> Vec3

Rotates around the x axis by angle (in radians).

Source

pub fn rotate_y(self, angle: f32) -> Vec3

Rotates around the y axis by angle (in radians).

Source

pub fn rotate_z(self, angle: f32) -> Vec3

Rotates around the z axis by angle (in radians).

Source

pub fn rotate_axis(self, axis: Vec3, angle: f32) -> Vec3

Rotates around axis by angle (in radians).

The axis must be a unit vector.

§Panics

Will panic if axis is not normalized when glam_assert is enabled.

Source

pub fn rotate_towards(self, rhs: Vec3, max_angle: f32) -> Vec3

Rotates towards rhs up to max_angle (in radians).

When max_angle is 0.0, the result will be equal to self. When max_angle is equal to self.angle_between(rhs), the result will be parallel to rhs. If max_angle is negative, rotates towards the exact opposite of rhs. Will not go past the target.

Source

pub fn any_orthogonal_vector(self) -> Vec3

Returns some vector that is orthogonal to the given one.

The input vector must be finite and non-zero.

The output vector is not necessarily unit length. For that use Self::any_orthonormal_vector() instead.

Source

pub fn any_orthonormal_vector(self) -> Vec3

Returns any unit vector that is orthogonal to the given one.

The input vector must be unit length.

§Panics

Will panic if self is not normalized when glam_assert is enabled.

Source

pub fn any_orthonormal_pair(self) -> (Vec3, Vec3)

Given a unit vector return two other vectors that together form an orthonormal basis. That is, all three vectors are orthogonal to each other and are normalized.

§Panics

Will panic if self is not normalized when glam_assert is enabled.

Source

pub fn slerp(self, rhs: Vec3, s: f32) -> Vec3

Performs a spherical linear interpolation between self and rhs based on the value s.

When s is 0.0, the result will be equal to self. When s is 1.0, the result will be equal to rhs. When s is outside of range [0, 1], the result is linearly extrapolated.

Source

pub fn as_dvec3(self) -> DVec3

Casts all elements of self to f64.

Source

pub fn as_i8vec3(self) -> I8Vec3

Casts all elements of self to i8.

Source

pub fn as_u8vec3(self) -> U8Vec3

Casts all elements of self to u8.

Source

pub fn as_i16vec3(self) -> I16Vec3

Casts all elements of self to i16.

Source

pub fn as_u16vec3(self) -> U16Vec3

Casts all elements of self to u16.

Source

pub fn as_ivec3(self) -> IVec3

Casts all elements of self to i32.

Source

pub fn as_uvec3(self) -> UVec3

Casts all elements of self to u32.

Source

pub fn as_i64vec3(self) -> I64Vec3

Casts all elements of self to i64.

Source

pub fn as_u64vec3(self) -> U64Vec3

Casts all elements of self to u64.

Source

pub fn as_isizevec3(self) -> ISizeVec3

Casts all elements of self to isize.

Source

pub fn as_usizevec3(self) -> USizeVec3

Casts all elements of self to usize.

Trait Implementations§

Source§

impl Add<&Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Vec3) -> Vec3

Performs the + operation. Read more
Source§

impl Add<&Vec3> for Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &Vec3) -> Vec3

Performs the + operation. Read more
Source§

impl Add<&f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &f32) -> Vec3

Performs the + operation. Read more
Source§

impl Add<&f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &f32) -> Vec3

Performs the + operation. Read more
Source§

impl Add<Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> Vec3

Performs the + operation. Read more
Source§

impl Add<f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

fn add(self, rhs: f32) -> Vec3

Performs the + operation. Read more
Source§

impl Add for Vec3

Source§

type Output = Vec3

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&Vec3> for Vec3

Source§

fn add_assign(&mut self, rhs: &Vec3)

Performs the += operation. Read more
Source§

impl AddAssign<&f32> for Vec3

Source§

fn add_assign(&mut self, rhs: &f32)

Performs the += operation. Read more
Source§

impl AddAssign<f32> for Vec3

Source§

fn add_assign(&mut self, rhs: f32)

Performs the += operation. Read more
Source§

impl AddAssign for Vec3

Source§

fn add_assign(&mut self, rhs: Vec3)

Performs the += operation. Read more
Source§

impl Animatable for Vec3

Source§

fn interpolate(a: Vec3, b: Vec3, progress: f32) -> Vec3

Source§

impl Archive for Vec3

Source§

type Archived = Vec3

The archived representation of this type. Read more
Source§

type Resolver = ()

The resolver for this type. It must contain all the additional information from serializing needed to make the archived type from the normal type.
Source§

fn resolve( &self, _: <Vec3 as Archive>::Resolver, out: Place<<Vec3 as Archive>::Archived>, )

Creates the archived version of this value at the given position and writes it to the given output. Read more
Source§

const COPY_OPTIMIZATION: CopyOptimization<Self> = _

An optimization flag that allows the bytes of this type to be copied directly to a writer instead of calling serialize. Read more
Source§

impl AsMut<[f32; 3]> for Vec3

Source§

fn as_mut(&mut self) -> &mut [f32; 3]

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

impl AsRef<[f32; 3]> for Vec3

Source§

fn as_ref(&self) -> &[f32; 3]

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

impl<C> CheckBytes<C> for Vec3
where C: Fallible + ?Sized,

Source§

unsafe fn check_bytes( _value: *const Vec3, _: &mut C, ) -> Result<(), <C as Fallible>::Error>

Checks whether the given pointer points to a valid value within the given context. Read more
Source§

impl Clone for Vec3

Source§

fn clone(&self) -> Vec3

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 Debug for Vec3

Source§

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

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

impl Default for Vec3

Source§

fn default() -> Vec3

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Vec3

Deserialize expects a sequence of 3 values.

Source§

fn deserialize<D>( deserializer: D, ) -> Result<Vec3, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<D> Deserialize<Vec3, D> for Vec3
where D: Fallible + ?Sized,

Source§

fn deserialize(&self, _: &mut D) -> Result<Vec3, <D as Fallible>::Error>

Deserializes using the given deserializer
Source§

impl Display for Vec3

Source§

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

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

impl Div<&Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Vec3) -> Vec3

Performs the / operation. Read more
Source§

impl Div<&Vec3> for Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Vec3) -> Vec3

Performs the / operation. Read more
Source§

impl Div<&f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &f32) -> Vec3

Performs the / operation. Read more
Source§

impl Div<&f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &f32) -> Vec3

Performs the / operation. Read more
Source§

impl Div<Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> Vec3

Performs the / operation. Read more
Source§

impl Div<f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

fn div(self, rhs: f32) -> Vec3

Performs the / operation. Read more
Source§

impl Div for Vec3

Source§

type Output = Vec3

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&Vec3> for Vec3

Source§

fn div_assign(&mut self, rhs: &Vec3)

Performs the /= operation. Read more
Source§

impl DivAssign<&f32> for Vec3

Source§

fn div_assign(&mut self, rhs: &f32)

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for Vec3

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl DivAssign for Vec3

Source§

fn div_assign(&mut self, rhs: Vec3)

Performs the /= operation. Read more
Source§

impl From<[f32; 3]> for Vec3

Source§

fn from(a: [f32; 3]) -> Vec3

Converts to this type from the input type.
Source§

impl From<(Vec2, f32)> for Vec3

Source§

fn from(_: (Vec2, f32)) -> Vec3

Converts to this type from the input type.
Source§

impl From<(f32, f32, f32)> for Vec3

Source§

fn from(t: (f32, f32, f32)) -> Vec3

Converts to this type from the input type.
Source§

impl From<BVec3> for Vec3

Source§

fn from(v: BVec3) -> Vec3

Converts to this type from the input type.
Source§

impl From<BVec3A> for Vec3

Source§

fn from(v: BVec3A) -> Vec3

Converts to this type from the input type.
Source§

impl From<Dir3> for Vec3

Source§

fn from(value: Dir3) -> Vec3

Converts to this type from the input type.
Source§

impl From<Point3<f32>> for Vec3

Source§

fn from(v: Point3<f32>) -> Vec3

Converts to this type from the input type.
Source§

impl From<Vec3> for (f32, f32, f32)

Source§

fn from(v: Vec3) -> (f32, f32, f32)

Converts to this type from the input type.
Source§

impl From<Vec3> for Vec3A

Source§

fn from(v: Vec3) -> Vec3A

Converts to this type from the input type.
Source§

impl From<Vec3A> for Vec3

Source§

fn from(v: Vec3A) -> Vec3

Converts to this type from the input type.
Source§

impl From<Vector3<f32>> for Vec3

Source§

fn from(v: Vector3<f32>) -> Vec3

Converts to this type from the input type.
Source§

impl Index<usize> for Vec3

Source§

type Output = f32

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &<Vec3 as Index<usize>>::Output

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

impl IndexMut<usize> for Vec3

Source§

fn index_mut(&mut self, index: usize) -> &mut <Vec3 as Index<usize>>::Output

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

impl IntoMint for Vec3

Source§

type MintType = Vector3<f32>

The mint type that this type is associated with.
Source§

impl Mul<&Vec3> for &Mat3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&Vec3> for &Quat

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&Vec3> for Mat3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&Vec3> for Quat

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&Vec3> for Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &Vec3) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &f32) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<&f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: &f32) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<Vec3> for &Mat3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec3> for &Quat

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec3> for Mat3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec3) -> <Mat3 as Mul<Vec3>>::Output

Performs the * operation. Read more
Source§

impl Mul<Vec3> for Quat

Source§

fn mul(self, rhs: Vec3) -> <Quat as Mul<Vec3>>::Output

Multiplies a quaternion and a 3D vector, returning the rotated vector.

§Panics

Will panic if self is not normalized when glam_assert is enabled.

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

impl Mul<Vec3> for Transform3D

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: Vec3) -> <Transform3D as Mul<Vec3>>::Output

Performs the * operation. Read more
Source§

impl Mul<f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Vec3

Performs the * operation. Read more
Source§

impl Mul<f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: f32) -> Vec3

Performs the * operation. Read more
Source§

impl Mul for Vec3

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&Vec3> for Vec3

Source§

fn mul_assign(&mut self, rhs: &Vec3)

Performs the *= operation. Read more
Source§

impl MulAssign<&f32> for Vec3

Source§

fn mul_assign(&mut self, rhs: &f32)

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for Vec3

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl MulAssign for Vec3

Source§

fn mul_assign(&mut self, rhs: Vec3)

Performs the *= operation. Read more
Source§

impl Neg for &Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn neg(self) -> Vec3

Performs the unary - operation. Read more
Source§

impl Neg for Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn neg(self) -> Vec3

Performs the unary - operation. Read more
Source§

impl NormedVectorSpace for Vec3

Source§

fn norm(self) -> f32

The size of this element. The return value should always be nonnegative.
Source§

fn norm_squared(self) -> f32

The squared norm of this element. Computing this is often faster than computing NormedVectorSpace::norm.
Source§

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

The distance between this element and another, as determined by the norm.
Source§

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

The squared distance between this element and another, as determined by the norm. Note that this is often faster to compute in practice than NormedVectorSpace::distance.
Source§

impl PartialEq for Vec3

Source§

fn eq(&self, other: &Vec3) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialLerp for Vec3

Source§

fn partial_lerp(&self, other: &Vec3, t: f32) -> Vec3

Source§

impl<'a> Product<&'a Vec3> for Vec3

Source§

fn product<I>(iter: I) -> Vec3
where I: Iterator<Item = &'a Vec3>,

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

impl Product for Vec3

Source§

fn product<I>(iter: I) -> Vec3
where I: Iterator<Item = Vec3>,

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

impl Rem<&Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Vec3) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<&Vec3> for Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &Vec3) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<&f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &f32) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<&f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: &f32) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Vec3) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: f32) -> Vec3

Performs the % operation. Read more
Source§

impl Rem<f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: f32) -> Vec3

Performs the % operation. Read more
Source§

impl Rem for Vec3

Source§

type Output = Vec3

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: Vec3) -> Vec3

Performs the % operation. Read more
Source§

impl RemAssign<&Vec3> for Vec3

Source§

fn rem_assign(&mut self, rhs: &Vec3)

Performs the %= operation. Read more
Source§

impl RemAssign<&f32> for Vec3

Source§

fn rem_assign(&mut self, rhs: &f32)

Performs the %= operation. Read more
Source§

impl RemAssign<f32> for Vec3

Source§

fn rem_assign(&mut self, rhs: f32)

Performs the %= operation. Read more
Source§

impl RemAssign for Vec3

Source§

fn rem_assign(&mut self, rhs: Vec3)

Performs the %= operation. Read more
Source§

impl SampleUniform for Vec3

Source§

type Sampler = UniformVec3<UniformFloat<f32>>

The UniformSampler implementation supporting type X.
Source§

impl<S> Serialize<S> for Vec3
where S: Fallible + ?Sized,

Source§

fn serialize( &self, _: &mut S, ) -> Result<<Vec3 as Archive>::Resolver, <S as Fallible>::Error>

Writes the dependencies for the object and returns a resolver that can create the archived type.
Source§

impl Serialize for Vec3

Serialize as a sequence of 3 values.

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Sub<&Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Vec3) -> Vec3

Performs the - operation. Read more
Source§

impl Sub<&Vec3> for Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &Vec3) -> Vec3

Performs the - operation. Read more
Source§

impl Sub<&f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &f32) -> Vec3

Performs the - operation. Read more
Source§

impl Sub<&f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: &f32) -> Vec3

Performs the - operation. Read more
Source§

impl Sub<Vec3> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<f32> for &Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> Vec3

Performs the - operation. Read more
Source§

impl Sub<f32> for Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: f32) -> Vec3

Performs the - operation. Read more
Source§

impl Sub for Vec3

Source§

type Output = Vec3

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&Vec3> for Vec3

Source§

fn sub_assign(&mut self, rhs: &Vec3)

Performs the -= operation. Read more
Source§

impl SubAssign<&f32> for Vec3

Source§

fn sub_assign(&mut self, rhs: &f32)

Performs the -= operation. Read more
Source§

impl SubAssign<f32> for Vec3

Source§

fn sub_assign(&mut self, rhs: f32)

Performs the -= operation. Read more
Source§

impl SubAssign for Vec3

Source§

fn sub_assign(&mut self, rhs: Vec3)

Performs the -= operation. Read more
Source§

impl<'a> Sum<&'a Vec3> for Vec3

Source§

fn sum<I>(iter: I) -> Vec3
where I: Iterator<Item = &'a Vec3>,

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

impl Sum for Vec3

Source§

fn sum<I>(iter: I) -> Vec3
where I: Iterator<Item = Vec3>,

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

impl Vec3Swizzles for Vec3

Source§

type Vec2 = Vec2

Source§

type Vec4 = Vec4

Source§

fn xx(self) -> Vec2

Source§

fn xy(self) -> Vec2

Source§

fn with_xy(self, rhs: Vec2) -> Vec3

Source§

fn xz(self) -> Vec2

Source§

fn with_xz(self, rhs: Vec2) -> Vec3

Source§

fn yx(self) -> Vec2

Source§

fn with_yx(self, rhs: Vec2) -> Vec3

Source§

fn yy(self) -> Vec2

Source§

fn yz(self) -> Vec2

Source§

fn with_yz(self, rhs: Vec2) -> Vec3

Source§

fn zx(self) -> Vec2

Source§

fn with_zx(self, rhs: Vec2) -> Vec3

Source§

fn zy(self) -> Vec2

Source§

fn with_zy(self, rhs: Vec2) -> Vec3

Source§

fn zz(self) -> Vec2

Source§

fn xxx(self) -> Vec3

Source§

fn xxy(self) -> Vec3

Source§

fn xxz(self) -> Vec3

Source§

fn xyx(self) -> Vec3

Source§

fn xyy(self) -> Vec3

Source§

fn xzx(self) -> Vec3

Source§

fn xzy(self) -> Vec3

Source§

fn xzz(self) -> Vec3

Source§

fn yxx(self) -> Vec3

Source§

fn yxy(self) -> Vec3

Source§

fn yxz(self) -> Vec3

Source§

fn yyx(self) -> Vec3

Source§

fn yyy(self) -> Vec3

Source§

fn yyz(self) -> Vec3

Source§

fn yzx(self) -> Vec3

Source§

fn yzy(self) -> Vec3

Source§

fn yzz(self) -> Vec3

Source§

fn zxx(self) -> Vec3

Source§

fn zxy(self) -> Vec3

Source§

fn zxz(self) -> Vec3

Source§

fn zyx(self) -> Vec3

Source§

fn zyy(self) -> Vec3

Source§

fn zyz(self) -> Vec3

Source§

fn zzx(self) -> Vec3

Source§

fn zzy(self) -> Vec3

Source§

fn zzz(self) -> Vec3

Source§

fn xxxx(self) -> Vec4

Source§

fn xxxy(self) -> Vec4

Source§

fn xxxz(self) -> Vec4

Source§

fn xxyx(self) -> Vec4

Source§

fn xxyy(self) -> Vec4

Source§

fn xxyz(self) -> Vec4

Source§

fn xxzx(self) -> Vec4

Source§

fn xxzy(self) -> Vec4

Source§

fn xxzz(self) -> Vec4

Source§

fn xyxx(self) -> Vec4

Source§

fn xyxy(self) -> Vec4

Source§

fn xyxz(self) -> Vec4

Source§

fn xyyx(self) -> Vec4

Source§

fn xyyy(self) -> Vec4

Source§

fn xyyz(self) -> Vec4

Source§

fn xyzx(self) -> Vec4

Source§

fn xyzy(self) -> Vec4

Source§

fn xyzz(self) -> Vec4

Source§

fn xzxx(self) -> Vec4

Source§

fn xzxy(self) -> Vec4

Source§

fn xzxz(self) -> Vec4

Source§

fn xzyx(self) -> Vec4

Source§

fn xzyy(self) -> Vec4

Source§

fn xzyz(self) -> Vec4

Source§

fn xzzx(self) -> Vec4

Source§

fn xzzy(self) -> Vec4

Source§

fn xzzz(self) -> Vec4

Source§

fn yxxx(self) -> Vec4

Source§

fn yxxy(self) -> Vec4

Source§

fn yxxz(self) -> Vec4

Source§

fn yxyx(self) -> Vec4

Source§

fn yxyy(self) -> Vec4

Source§

fn yxyz(self) -> Vec4

Source§

fn yxzx(self) -> Vec4

Source§

fn yxzy(self) -> Vec4

Source§

fn yxzz(self) -> Vec4

Source§

fn yyxx(self) -> Vec4

Source§

fn yyxy(self) -> Vec4

Source§

fn yyxz(self) -> Vec4

Source§

fn yyyx(self) -> Vec4

Source§

fn yyyy(self) -> Vec4

Source§

fn yyyz(self) -> Vec4

Source§

fn yyzx(self) -> Vec4

Source§

fn yyzy(self) -> Vec4

Source§

fn yyzz(self) -> Vec4

Source§

fn yzxx(self) -> Vec4

Source§

fn yzxy(self) -> Vec4

Source§

fn yzxz(self) -> Vec4

Source§

fn yzyx(self) -> Vec4

Source§

fn yzyy(self) -> Vec4

Source§

fn yzyz(self) -> Vec4

Source§

fn yzzx(self) -> Vec4

Source§

fn yzzy(self) -> Vec4

Source§

fn yzzz(self) -> Vec4

Source§

fn zxxx(self) -> Vec4

Source§

fn zxxy(self) -> Vec4

Source§

fn zxxz(self) -> Vec4

Source§

fn zxyx(self) -> Vec4

Source§

fn zxyy(self) -> Vec4

Source§

fn zxyz(self) -> Vec4

Source§

fn zxzx(self) -> Vec4

Source§

fn zxzy(self) -> Vec4

Source§

fn zxzz(self) -> Vec4

Source§

fn zyxx(self) -> Vec4

Source§

fn zyxy(self) -> Vec4

Source§

fn zyxz(self) -> Vec4

Source§

fn zyyx(self) -> Vec4

Source§

fn zyyy(self) -> Vec4

Source§

fn zyyz(self) -> Vec4

Source§

fn zyzx(self) -> Vec4

Source§

fn zyzy(self) -> Vec4

Source§

fn zyzz(self) -> Vec4

Source§

fn zzxx(self) -> Vec4

Source§

fn zzxy(self) -> Vec4

Source§

fn zzxz(self) -> Vec4

Source§

fn zzyx(self) -> Vec4

Source§

fn zzyy(self) -> Vec4

Source§

fn zzyz(self) -> Vec4

Source§

fn zzzx(self) -> Vec4

Source§

fn zzzy(self) -> Vec4

Source§

fn zzzz(self) -> Vec4

Source§

fn xyz(self) -> Self

Source§

impl VectorSpace for Vec3

Source§

const ZERO: Vec3 = Vec3::ZERO

The zero vector, which is the identity of addition for the vector space type.
Source§

type Scalar = f32

The scalar type of this vector space.
Source§

fn lerp(self, rhs: Self, t: Self::Scalar) -> Self

Perform vector space linear interpolation between this element and another, based on the parameter t. When t is 0, self is recovered. When t is 1, rhs is recovered. Read more
Source§

impl Zeroable for Vec3

Source§

fn zeroed() -> Self

Source§

impl Copy for Vec3

Source§

impl NoUndef for Vec3

Source§

impl Pod for Vec3

Source§

impl Portable for Vec3

Source§

impl StructuralPartialEq for Vec3

Auto Trait Implementations§

§

impl Freeze for Vec3

§

impl RefUnwindSafe for Vec3

§

impl Send for Vec3

§

impl Sync for Vec3

§

impl Unpin for Vec3

§

impl UnsafeUnpin for Vec3

§

impl UnwindSafe for Vec3

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: Real + Zero + Arithmetics + Clone, Swp: WhitePoint<T>, Dwp: WhitePoint<T>, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<T>,

Convert the source color to the destination color using the specified method.
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default.
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> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<T> ArchiveUnsized for T
where T: Archive,

Source§

type Archived = <T as Archive>::Archived

The archived counterpart of this type. Unlike Archive, it may be unsized. Read more
Source§

fn archived_metadata( &self, ) -> <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata

Creates the archived version of the metadata for this value.
Source§

impl<T, C> ArraysFrom<C> for T
where C: IntoArrays<T>,

Source§

fn arrays_from(colors: C) -> T

Cast a collection of colors into a collection of arrays.
Source§

impl<T, C> ArraysInto<C> for T
where C: FromArrays<T>,

Source§

fn arrays_into(self) -> C

Cast this collection of arrays into a collection of colors.
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<WpParam, T, U> Cam16IntoUnclamped<WpParam, T> for U
where T: FromCam16Unclamped<WpParam, U>,

Source§

type Scalar = <T as FromCam16Unclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn cam16_into_unclamped( self, parameters: BakedParameters<WpParam, <U as Cam16IntoUnclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T> CheckedBitPattern for T
where T: AnyBitPattern,

Source§

type Bits = T

Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern.
Source§

fn is_valid_bit_pattern(_bits: &T) -> bool

If this function returns true, then it must be valid to reinterpret bits as &Self.
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, C> ComponentsFrom<C> for T
where C: IntoComponents<T>,

Source§

fn components_from(colors: C) -> T

Cast a collection of colors into a collection of color components.
Source§

impl<T> Content for T
where T: Copy,

Source§

type Owned = T

A type that holds a sized version of the content.
Source§

unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

Prepares an output buffer, then turns this buffer into an Owned. User-provided closure F must only write to and not read from &mut Self.
Source§

fn get_elements_size() -> usize

Returns the size of each element.
Source§

fn to_void_ptr(&self) -> *const ()

Produces a pointer to the data.
Source§

fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>

Builds a pointer to this type from a raw pointer.
Source§

fn is_size_suitable(size: usize) -> bool

Returns true if the size is suitable to store a type like this.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Converts Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Converts Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Converts &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSend for T
where T: Any + Send,

Source§

fn into_any_send(self: Box<T>) -> Box<dyn Any + Send>

Converts Box<Trait> (where Trait: DowncastSend) to Box<dyn Any + Send>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_sync(self: Box<T>) -> Box<dyn Any + Send + Sync>

Converts Box<Trait> (where Trait: DowncastSync) to Box<dyn Any + Send + Sync>, which can then be downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Converts Arc<Trait> (where Trait: DowncastSync) to Arc<Any>, which can then be downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<V> Ease for V
where V: VectorSpace<Scalar = f32>,

Source§

fn interpolating_curve_unbounded(start: V, end: V) -> impl Curve<V>

Given start and end values, produce a curve with unlimited domain that: Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromAngle<T> for T

Source§

fn from_angle(angle: T) -> T

Performs a conversion from angle.
Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

impl<T, U> FromStimulus<U> for T
where U: IntoStimulus<T>,

Source§

fn from_stimulus(other: U) -> T

Converts other into Self, while performing the appropriate scaling, rounding and clamping.
Source§

impl<V> HasTangent for V
where V: VectorSpace,

Source§

type Tangent = V

The tangent type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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<T, U> IntoAngle<U> for T
where U: FromAngle<T>,

Source§

fn into_angle(self) -> U

Performs a conversion into T.
Source§

impl<WpParam, T, U> IntoCam16Unclamped<WpParam, T> for U
where T: Cam16FromUnclamped<WpParam, U>,

Source§

type Scalar = <T as Cam16FromUnclamped<WpParam, U>>::Scalar

The number type that’s used in parameters when converting.
Source§

fn into_cam16_unclamped( self, parameters: BakedParameters<WpParam, <U as IntoCam16Unclamped<WpParam, T>>::Scalar>, ) -> T

Converts self into C, using the provided parameters.
Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> IntoStimulus<T> for T

Source§

fn into_stimulus(self) -> T

Converts self into T, while performing the appropriate scaling, rounding and clamping.
Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T> Lerpable for T
where T: Sub<Output = T> + Add<Output = T> + Mul<f32, Output = T> + Copy,

Source§

fn lerp(self, other: Self, progress: f32) -> Self

Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<D> OwoColorize for D

Source§

fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>
where C: Color,

Set the foreground color generically Read more
Source§

fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>
where C: Color,

Set the background color generically. Read more
Source§

fn black(&self) -> FgColorDisplay<'_, Black, Self>

Change the foreground color to black
Source§

fn on_black(&self) -> BgColorDisplay<'_, Black, Self>

Change the background color to black
Source§

fn red(&self) -> FgColorDisplay<'_, Red, Self>

Change the foreground color to red
Source§

fn on_red(&self) -> BgColorDisplay<'_, Red, Self>

Change the background color to red
Source§

fn green(&self) -> FgColorDisplay<'_, Green, Self>

Change the foreground color to green
Source§

fn on_green(&self) -> BgColorDisplay<'_, Green, Self>

Change the background color to green
Source§

fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>

Change the foreground color to yellow
Source§

fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>

Change the background color to yellow
Source§

fn blue(&self) -> FgColorDisplay<'_, Blue, Self>

Change the foreground color to blue
Source§

fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>

Change the background color to blue
Source§

fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to magenta
Source§

fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to magenta
Source§

fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>

Change the foreground color to purple
Source§

fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>

Change the background color to purple
Source§

fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>

Change the foreground color to cyan
Source§

fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>

Change the background color to cyan
Source§

fn white(&self) -> FgColorDisplay<'_, White, Self>

Change the foreground color to white
Source§

fn on_white(&self) -> BgColorDisplay<'_, White, Self>

Change the background color to white
Source§

fn default_color(&self) -> FgColorDisplay<'_, Default, Self>

Change the foreground color to the terminal default
Source§

fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>

Change the background color to the terminal default
Source§

fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>

Change the foreground color to bright black
Source§

fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>

Change the background color to bright black
Source§

fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>

Change the foreground color to bright red
Source§

fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>

Change the background color to bright red
Source§

fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>

Change the foreground color to bright green
Source§

fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>

Change the background color to bright green
Source§

fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>

Change the foreground color to bright yellow
Source§

fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>

Change the background color to bright yellow
Source§

fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>

Change the foreground color to bright blue
Source§

fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>

Change the background color to bright blue
Source§

fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright magenta
Source§

fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright magenta
Source§

fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>

Change the foreground color to bright purple
Source§

fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>

Change the background color to bright purple
Source§

fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>

Change the foreground color to bright cyan
Source§

fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>

Change the background color to bright cyan
Source§

fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>

Change the foreground color to bright white
Source§

fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>

Change the background color to bright white
Source§

fn bold(&self) -> BoldDisplay<'_, Self>

Make the text bold
Source§

fn dimmed(&self) -> DimDisplay<'_, Self>

Make the text dim
Source§

fn italic(&self) -> ItalicDisplay<'_, Self>

Make the text italicized
Source§

fn underline(&self) -> UnderlineDisplay<'_, Self>

Make the text underlined
Make the text blink
Make the text blink (but fast!)
Source§

fn reversed(&self) -> ReversedDisplay<'_, Self>

Swap the foreground and background colors
Source§

fn hidden(&self) -> HiddenDisplay<'_, Self>

Hide the text
Source§

fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>

Cross out the text
Source§

fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the foreground color at runtime. Only use if you do not know which color will be used at compile-time. If the color is constant, use either OwoColorize::fg or a color-specific method, such as OwoColorize::green, Read more
Source§

fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>
where Color: DynColor,

Set the background color at runtime. Only use if you do not know what color to use at compile-time. If the color is constant, use either OwoColorize::bg or a color-specific method, such as OwoColorize::on_yellow, Read more
Source§

fn fg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> FgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the foreground color to a specific RGB value.
Source§

fn bg_rgb<const R: u8, const G: u8, const B: u8>( &self, ) -> BgColorDisplay<'_, CustomColor<R, G, B>, Self>

Set the background color to a specific RGB value.
Source§

fn truecolor(&self, r: u8, g: u8, b: u8) -> FgDynColorDisplay<'_, Rgb, Self>

Sets the foreground color to an RGB value.
Source§

fn on_truecolor(&self, r: u8, g: u8, b: u8) -> BgDynColorDisplay<'_, Rgb, Self>

Sets the background color to an RGB value.
Source§

fn style(&self, style: Style) -> Styled<&Self>

Apply a runtime-determined style
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<Borrowed> SampleBorrow<Borrowed> for Borrowed
where Borrowed: SampleUniform,

Source§

fn borrow(&self) -> &Borrowed

Immutably borrows from an owned value. See Borrow::borrow
Source§

impl<T, S> SerializeUnsized<S> for T
where T: Serialize<S>, S: Fallible + Writer + ?Sized,

Source§

fn serialize_unsized( &self, serializer: &mut S, ) -> Result<usize, <S as Fallible>::Error>

Writes the object and returns the position of the archived type.
Source§

impl<V> StableInterpolate for V
where V: NormedVectorSpace<Scalar = f32>,

Source§

fn interpolate_stable(&self, other: &V, t: f32) -> V

Interpolate between this value and the other given value using the parameter t. At t = 0.0, a value equivalent to self is recovered, while t = 1.0 recovers a value equivalent to other, with intermediate values interpolating between the two. See the trait-level documentation for details.
Source§

fn interpolate_stable_assign(&mut self, other: &Self, t: f32)

A version of interpolate_stable that assigns the result to self for convenience.
Source§

fn smooth_nudge(&mut self, target: &Self, decay_rate: f32, delta: f32)

Smoothly nudge this value towards the target at a given decay rate. The decay_rate parameter controls how fast the distance between self and target decays relative to the units of delta; the intended usage is for decay_rate to generally remain fixed, while delta is something like delta_time from an updating system. This produces a smooth following of the target that is independent of framerate. Read more
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, C> TryComponentsInto<C> for T
where C: TryFromComponents<T>,

Source§

type Error = <C as TryFromComponents<T>>::Error

The error for when try_into_colors fails to cast.
Source§

fn try_components_into(self) -> Result<C, <T as TryComponentsInto<C>>::Error>

Try to cast this collection of color components into a collection of colors. 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<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more
Source§

impl<T> TryStableInterpolate for T

Source§

type Error = Infallible

Error produced when the value cannot be interpolated.
Source§

fn try_interpolate_stable( &self, other: &T, t: f32, ) -> Result<T, <T as TryStableInterpolate>::Error>

Attempt to interpolate the value. This may fail if the two interpolation values have different units, or if the type is not interpolable.
Source§

impl<C, U> UintsFrom<C> for U
where C: IntoUints<U>,

Source§

fn uints_from(colors: C) -> U

Cast a collection of colors into a collection of unsigned integers.
Source§

impl<C, U> UintsInto<C> for U
where C: FromUints<U>,

Source§

fn uints_into(self) -> C

Cast this collection of unsigned integers into a collection of colors.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> AnyBitPattern for T
where T: Pod,

Source§

impl<T> Arithmetics for T
where T: Neg<Output = T> + Add<Output = T, Output = T> + for<'a> Add<&'a T> + Mul<Output = T, Output = T> + for<'a> Sub<&'a T, Output = T, Output = T> + for<'a> Mul<&'a T> + Div<Output = T, Output = T> + for<'a> Div<&'a T> + Sub,

Source§

impl<T, Right> ClosedAdd<Right> for T
where T: Add<Right, Output = T> + AddAssign<Right>,

Source§

impl<T, Right> ClosedAddAssign<Right> for T
where T: ClosedAdd<Right> + AddAssign<Right>,

Source§

impl<T, Right> ClosedDiv<Right> for T
where T: Div<Right, Output = T> + DivAssign<Right>,

Source§

impl<T, Right> ClosedDivAssign<Right> for T
where T: ClosedDiv<Right> + DivAssign<Right>,

Source§

impl<T, Right> ClosedMul<Right> for T
where T: Mul<Right, Output = T> + MulAssign<Right>,

Source§

impl<T, Right> ClosedMulAssign<Right> for T
where T: ClosedMul<Right> + MulAssign<Right>,

Source§

impl<T> ClosedNeg for T
where T: Neg<Output = T>,

Source§

impl<T, Right> ClosedSub<Right> for T
where T: Sub<Right, Output = T> + SubAssign<Right>,

Source§

impl<T, Right> ClosedSubAssign<Right> for T
where T: ClosedSub<Right> + SubAssign<Right>,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> NoUninit for T
where T: Pod,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,

Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<T> SerializableAny for T
where T: 'static + Any + Clone + for<'a> Send + Sync,