Skip to main content

Quat

Struct Quat 

Source
pub struct Quat(/* private fields */);
Expand description

A quaternion representing an orientation.

This quaternion is intended to be of unit length but may denormalize due to floating point “error creep” which can occur when successive quaternion operations are applied.

SIMD vector types are used for storage on supported platforms.

This type is 16 byte aligned.

Implementations§

Source§

impl Quat

Source

pub const IDENTITY: Quat

The identity quaternion. Corresponds to no rotation.

Source

pub const NAN: Quat

All NANs.

Source

pub const fn from_xyzw(x: f32, y: f32, z: f32, w: f32) -> Quat

Creates a new rotation quaternion.

This should generally not be called manually unless you know what you are doing. Use one of the other constructors instead such as identity or from_axis_angle.

from_xyzw is mostly used by unit tests and serde deserialization.

§Preconditions

This function does not check if the input is normalized, it is up to the user to provide normalized input or to normalized the resulting quaternion.

Source

pub const fn from_array(a: [f32; 4]) -> Quat

Creates a rotation quaternion from an array.

§Preconditions

This function does not check if the input is normalized, it is up to the user to provide normalized input or to normalized the resulting quaternion.

Source

pub const fn from_vec4(v: Vec4) -> Quat

Creates a new rotation quaternion from a 4D vector.

§Preconditions

This function does not check if the input is normalized, it is up to the user to provide normalized input or to normalized the resulting quaternion.

Source

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

Creates a rotation quaternion from a slice.

§Preconditions

This function does not check if the input is normalized, it is up to the user to provide normalized input or to normalized the resulting quaternion.

§Panics

Panics if slice length is less than 4.

Source

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

Writes the quaternion to an unaligned slice.

§Panics

Panics if slice length is less than 4.

Source

pub fn from_axis_angle(axis: Vec3, angle: f32) -> Quat

Create a quaternion for a normalized rotation axis and 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 from_scaled_axis(v: Vec3) -> Quat

Create a quaternion that rotates v.length() radians around v.normalize().

from_scaled_axis(Vec3::ZERO) results in the identity quaternion.

Source

pub fn from_rotation_x(angle: f32) -> Quat

Creates a quaternion from the angle (in radians) around the x axis.

Source

pub fn from_rotation_y(angle: f32) -> Quat

Creates a quaternion from the angle (in radians) around the y axis.

Source

pub fn from_rotation_z(angle: f32) -> Quat

Creates a quaternion from the angle (in radians) around the z axis.

Source

pub fn from_euler(euler: EulerRot, a: f32, b: f32, c: f32) -> Quat

Creates a quaternion from the given Euler rotation sequence and the angles (in radians).

Source

pub fn from_rotation_axes(x_axis: Vec3, y_axis: Vec3, z_axis: Vec3) -> Quat

From the columns of a 3x3 rotation matrix.

Note if the input axes contain scales, shears, or other non-rotation transformations then the output of this function is ill-defined.

§Panics

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

Source

pub fn from_mat3(mat: &Mat3) -> Quat

Creates a quaternion from a 3x3 rotation matrix.

Note if the input matrix contain scales, shears, or other non-rotation transformations then the resulting quaternion will be ill-defined.

§Panics

Will panic if any input matrix column is not normalized when glam_assert is enabled.

Source

pub fn from_mat3a(mat: &Mat3A) -> Quat

Creates a quaternion from a 3x3 SIMD aligned rotation matrix.

Note if the input matrix contain scales, shears, or other non-rotation transformations then the resulting quaternion will be ill-defined.

§Panics

Will panic if any input matrix column is not normalized when glam_assert is enabled.

Source

pub fn from_mat4(mat: &Mat4) -> Quat

Creates a quaternion from the upper 3x3 rotation matrix inside a homogeneous 4x4 matrix.

Note if the upper 3x3 matrix contain scales, shears, or other non-rotation transformations then the resulting quaternion will be ill-defined.

§Panics

Will panic if any column of the upper 3x3 rotation matrix is not normalized when glam_assert is enabled.

Source

pub fn from_rotation_arc(from: Vec3, to: Vec3) -> Quat

Gets the minimal rotation for transforming from to to. The rotation is in the plane spanned by the two vectors. Will rotate at most 180 degrees.

The inputs must be unit vectors.

from_rotation_arc(from, to) * from ≈ to.

For near-singular cases (from≈to and from≈-to) the current implementation is only accurate to about 0.001 (for f32).

§Panics

Will panic if from or to are not normalized when glam_assert is enabled.

Source

pub fn from_rotation_arc_colinear(from: Vec3, to: Vec3) -> Quat

Gets the minimal rotation for transforming from to either to or -to. This means that the resulting quaternion will rotate from so that it is colinear with to.

The rotation is in the plane spanned by the two vectors. Will rotate at most 90 degrees.

The inputs must be unit vectors.

to.dot(from_rotation_arc_colinear(from, to) * from).abs() ≈ 1.

§Panics

Will panic if from or to are not normalized when glam_assert is enabled.

Source

pub fn from_rotation_arc_2d(from: Vec2, to: Vec2) -> Quat

Gets the minimal rotation for transforming from to to. The resulting rotation is around the z axis. Will rotate at most 180 degrees.

The inputs must be unit vectors.

from_rotation_arc_2d(from, to) * from ≈ to.

For near-singular cases (from≈to and from≈-to) the current implementation is only accurate to about 0.001 (for f32).

§Panics

Will panic if from or to are not normalized when glam_assert is enabled.

Source

pub fn look_to_lh(dir: Vec3, up: Vec3) -> Quat

Creates a quaterion rotation from a facing direction and an up direction.

For a left-handed view coordinate system with +X=right, +Y=up and +Z=forward.

§Panics

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

Source

pub fn look_to_rh(dir: Vec3, up: Vec3) -> Quat

Creates a quaterion rotation from facing direction and an up direction.

For a right-handed view coordinate system with +X=right, +Y=up and +Z=back.

§Panics

Will panic if dir and up are not normalized when glam_assert is enabled.

Source

pub fn look_at_lh(eye: Vec3, center: Vec3, up: Vec3) -> Quat

Creates a left-handed view matrix using a camera position, a focal point, and an up direction.

For a left-handed view coordinate system with +X=right, +Y=up and +Z=forward.

§Panics

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

Source

pub fn look_at_rh(eye: Vec3, center: Vec3, up: Vec3) -> Quat

Creates a right-handed view matrix using a camera position, an up direction, and a focal point.

For a right-handed view coordinate system with +X=right, +Y=up and +Z=back.

§Panics

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

Source

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

Returns the rotation axis (normalized) and angle (in radians) of self.

Source

pub fn to_scaled_axis(self) -> Vec3

Returns the rotation axis scaled by the rotation in radians.

Source

pub fn to_euler(self, order: EulerRot) -> (f32, f32, f32)

Returns the rotation angles for the given euler rotation sequence.

Source

pub fn to_array(self) -> [f32; 4]

[x, y, z, w]

Source

pub fn xyz(self) -> Vec3

Returns the vector part of the quaternion.

Source

pub fn conjugate(self) -> Quat

Returns the quaternion conjugate of self. For a unit quaternion the conjugate is also the inverse.

Source

pub fn inverse(self) -> Quat

Returns the inverse of a normalized quaternion.

Typically quaternion inverse returns the conjugate of a normalized quaternion. Because self is assumed to already be unit length this method does not normalize before returning the conjugate.

§Panics

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

Source

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

Computes the dot product of self and rhs. The dot product is equal to the cosine of the angle between two quaternion rotations.

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 generally 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 normalize(self) -> Quat

Returns self normalized to length 1.0.

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

Panics

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

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_nan(self) -> bool

Returns true if any elements are NAN.

Source

pub fn is_normalized(self) -> bool

Returns whether self of length 1.0 or not.

Uses a precision threshold of 1e-6.

Source

pub fn is_near_identity(self) -> bool

Source

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

Returns the angle (in radians) for the minimal rotation for transforming this quaternion into another.

Both quaternions must be normalized.

§Panics

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

Source

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

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 equal to rhs. If max_angle is negative, rotates towards the exact opposite of rhs. Will not go past the target.

Both quaternions must be normalized.

§Panics

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

Source

pub fn abs_diff_eq(self, rhs: Quat, 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 quaternions 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 lerp(self, end: Quat, s: f32) -> Quat

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.

§Panics

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

Source

pub fn slerp(self, end: Quat, s: f32) -> Quat

Performs a spherical linear interpolation between self and end 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 end.

§Panics

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

Source

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

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

pub fn mul_quat(self, rhs: Quat) -> Quat

Multiplies two quaternions. If they each represent a rotation, the result will represent the combined rotation.

Note that due to floating point rounding the result may not be perfectly normalized.

§Panics

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

Source

pub fn from_affine3(a: &Affine3) -> Quat

Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform.

Note if the input affine matrix contain scales, shears, or other non-rotation transformations then the resulting quaternion will be ill-defined.

§Panics

Will panic if any input affine matrix column is not normalized when glam_assert is enabled.

Source

pub fn from_affine3a(a: &Affine3A) -> Quat

Creates a quaternion from a 3x3 rotation matrix inside a 3D affine transform.

Note if the input affine matrix contain scales, shears, or other non-rotation transformations then the resulting quaternion will be ill-defined.

§Panics

Will panic if any input affine matrix column is not normalized when glam_assert is enabled.

Source

pub fn mul_vec3a(self, rhs: Vec3A) -> Vec3A

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

Source

pub fn as_dquat(self) -> DQuat

Trait Implementations§

Source§

impl Add<&Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Quat> for Quat

Source§

type Output = Quat

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Quat

Source§

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

Adds two quaternions.

The sum is not guaranteed to be normalized.

Note that addition is not the same as combining the rotations represented by the two quaternions! That corresponds to multiplication.

Source§

type Output = Quat

The resulting type after applying the + operator.
Source§

impl AddAssign<&Quat> for Quat

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for Quat

Source§

fn add_assign(&mut self, rhs: Quat)

Performs the += operation. Read more
Source§

impl Animatable for Quat

Source§

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

Source§

impl Archive for Quat

Source§

type Archived = Quat

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, _: <Quat as Archive>::Resolver, out: Place<<Quat 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 AsRef<[f32; 4]> for Quat

Source§

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

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

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

Source§

unsafe fn check_bytes( _value: *const Quat, _: &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 Quat

Source§

fn clone(&self) -> Quat

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 Quat

Source§

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

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

impl Default for Quat

Source§

fn default() -> Quat

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

impl Deref for Quat

Source§

type Target = Vec4<f32>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Quat as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for Quat

Source§

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

Mutably dereferences the value.
Source§

impl<'de> Deserialize<'de> for Quat

Deserialize expects a sequence of 4 values.

Source§

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

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

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

Source§

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

Deserializes using the given deserializer
Source§

impl Display for Quat

Source§

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

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

impl Div<&f32> for &Quat

Source§

type Output = Quat

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&f32> for Quat

Source§

type Output = Quat

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for &Quat

Source§

type Output = Quat

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for Quat

Source§

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

Divides a quaternion by a scalar value. The quotient is not guaranteed to be normalized.

Source§

type Output = Quat

The resulting type after applying the / operator.
Source§

impl DivAssign<&f32> for Quat

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for Quat

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl Ease for Quat

Source§

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

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

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

Source§

fn from(q: Quat) -> (f32, f32, f32, f32)

Converts to this type from the input type.
Source§

impl From<Quat> for Vec4

Source§

fn from(q: Quat) -> Vec4

Converts to this type from the input type.
Source§

impl From<Quaternion<f32>> for Quat

Source§

fn from(q: Quaternion<f32>) -> Quat

Converts to this type from the input type.
Source§

impl IntoMint for Quat

Source§

type MintType = Quaternion<f32>

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

impl Mul<&Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Quat> for Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

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 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<&Vec3A> for &Quat

Source§

type Output = Vec3A

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vec3A> for Quat

Source§

type Output = Vec3A

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f32> for &Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f32> for Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Dir3> for Quat

Source§

fn mul(self, direction: Dir3) -> <Quat as Mul<Dir3>>::Output

Rotates the Dir3 using a Quat.

Source§

type Output = Dir3

The resulting type after applying the * operator.
Source§

impl Mul<Dir3A> for Quat

Source§

fn mul(self, direction: Dir3A) -> <Quat as Mul<Dir3A>>::Output

Rotates the Dir3A using a Quat.

Source§

type Output = Dir3A

The resulting type after applying the * operator.
Source§

impl Mul<Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

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 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<Vec3A> for &Quat

Source§

type Output = Vec3A

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec3A> for Quat

Source§

type Output = Vec3A

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f32> for &Quat

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f32> for Quat

Source§

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

Multiplies a quaternion by a scalar value.

The product is not guaranteed to be normalized.

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

impl Mul for Quat

Source§

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

Multiplies two quaternions. If they each represent a rotation, the result will represent the combined rotation.

Note that due to floating point rounding the result may not be perfectly normalized.

§Panics

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

Source§

type Output = Quat

The resulting type after applying the * operator.
Source§

impl MulAssign<&Quat> for Quat

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign<&f32> for Quat

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for Quat

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl MulAssign for Quat

Source§

fn mul_assign(&mut self, rhs: Quat)

Performs the *= operation. Read more
Source§

impl Neg for &Quat

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

fn neg(self) -> Quat

Performs the unary - operation. Read more
Source§

impl Neg for Quat

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

fn neg(self) -> Quat

Performs the unary - operation. Read more
Source§

impl PartialEq for Quat

Source§

fn eq(&self, rhs: &Quat) -> 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<'a> Product<&'a Quat> for Quat

Source§

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

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

impl Product for Quat

Source§

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

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

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

Source§

fn serialize( &self, _: &mut S, ) -> Result<<Quat 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 Quat

Serialize as a sequence of 4 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 StableInterpolate for Quat

Source§

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

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 Sub<&Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Quat> for Quat

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<Quat> for &Quat

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for Quat

Source§

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

Subtracts the rhs quaternion from self.

The difference is not guaranteed to be normalized.

Source§

type Output = Quat

The resulting type after applying the - operator.
Source§

impl SubAssign<&Quat> for Quat

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for Quat

Source§

fn sub_assign(&mut self, rhs: Quat)

Performs the -= operation. Read more
Source§

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

Source§

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

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

impl Sum for Quat

Source§

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

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

impl Zeroable for Quat

Source§

fn zeroed() -> Self

Source§

impl Copy for Quat

Source§

impl NoUndef for Quat

Source§

impl Pod for Quat

Source§

impl Portable for Quat

Auto Trait Implementations§

§

impl Freeze for Quat

§

impl RefUnwindSafe for Quat

§

impl Send for Quat

§

impl Sync for Quat

§

impl Unpin for Quat

§

impl UnsafeUnpin for Quat

§

impl UnwindSafe for Quat

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<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<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<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> Same for T

Source§

type Output = T

Should always be Self
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<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, 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> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

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