Struct Mat32

Source
pub struct Mat32 {
    pub x_axis: Vec3,
    pub y_axis: Vec3,
}
Expand description

A 3x2 column-major matrix.

Fields§

§x_axis: Vec3

The first column of the matrix.

§y_axis: Vec3

The second column of the matrix.

Implementations§

Source§

impl Mat32

Source

pub const ZERO: Self

A 3x2 matrix with all elements set to 0.0.

Source

pub const NAN: Self

All NaNs.

Source

pub const fn from_cols(x_axis: Vec3, y_axis: Vec3) -> Self

Creates a 3x2 matrix from two column vectors.

Source

pub const fn from_cols_array(m: &[f32; 6]) -> Self

Creates a 3x2 matrix from an array stored in column major order.

Source

pub const fn to_cols_array(&self) -> [f32; 6]

Creates an array storing data in column major order.

Source

pub const fn from_cols_array_2d(m: &[[f32; 3]; 2]) -> Self

Creates a 3x2 matrix from a 2D array stored in column major order.

Source

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

Creates a 2D array storing data in column major order.

Source

pub const fn from_cols_slice(slice: &[f32]) -> Self

Creates a 3x2 matrix from the first 6 values in slice.

§Panics

Panics if slice is less than 6 elements long.

Source

pub const fn from_rows(row0: Vec2, row1: Vec2, row2: Vec2) -> Self

Creates a 3x2 matrix from three row vectors.

Source

pub const fn from_rows_array(m: &[f32; 6]) -> Self

Creates a 2x3 matrix from an array stored in row major order.

Source

pub const fn to_rows_array(&self) -> [f32; 6]

Creates an array storing data in row major order.

Source

pub const fn from_rows_array_2d(m: &[[f32; 2]; 3]) -> Self

Creates a 2x3 matrix from a 2D array stored in row major order.

Source

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

Creates a 2D array storing data in row major order.

Source

pub const fn from_rows_slice(slice: &[f32]) -> Self

Creates a 2x3 matrix from the first 6 values in slice.

§Panics

Panics if slice is less than 6 elements long.

Source

pub fn from_outer_product(a: Vec3, b: Vec2) -> Self

Creates a new 3x2 matrix from the outer product a * b^T.

Source

pub const fn col(&self, index: usize) -> Vec3

Returns the matrix column for the given index.

§Panics

Panics if index is greater than 1.

Source

pub const fn row(&self, index: usize) -> Vec2

Returns the matrix row for the given index.

§Panics

Panics if index is greater than 2.

Source

pub fn is_finite(&self) -> bool

Returns true if, and only if, all elements are finite. If any element is either NaN or 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 transpose(&self) -> Mat23

Returns the transpose of self.

Source

pub fn abs(&self) -> Self

Takes the absolute value of each element in self.

Source

pub fn mul_vec2(&self, rhs: Vec2) -> Vec3

Transforms a 2D vector into a 3D vector.

Source

pub fn mul_mat2(&self, rhs: &Mat2) -> Self

Multiplies self by a 2x2 matrix, self * rhs.

Source

pub fn mul_symmetric_mat2(&self, rhs: &SymmetricMat2) -> Self

Multiplies self by a symmetric 2x2 matrix, self * rhs.

Source

pub fn mul_mat23(&self, rhs: &Mat23) -> Mat3

Multiplies self by a 2x3 matrix, self * rhs.

Source

pub fn mul_transposed_mat32(&self, rhs: &Self) -> Mat3

Multiplies self by another matrix that is treated as transposed, self * rhs.transpose().

Source

pub fn add_mat32(&self, rhs: &Self) -> Self

Adds two 2x2 matrices.

Source

pub fn sub_mat32(&self, rhs: &Self) -> Self

Subtracts two 2x2 matrices.

Source

pub fn mul_scalar(&self, rhs: f32) -> Self

Multiplies a 3x2 matrix by a scalar.

Source

pub fn div_scalar(&self, rhs: f32) -> Self

Divides a 3x2 matrix by a scalar.

Source§

impl Mat32

Source

pub fn as_dmat32(&self) -> DMat32

Returns the double precision version of self.

Trait Implementations§

Source§

impl Add<&&Mat32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&Mat32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for &Mat32

Source§

type Output = Mat32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for Mat32

Source§

type Output = Mat32

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl AddAssign<&Mat32> for Mat32

Source§

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

Performs the += operation. Read more
Source§

impl AddAssign for Mat32

Source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
Source§

impl Clone for Mat32

Source§

fn clone(&self) -> Mat32

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

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Mat32

Source§

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

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

impl Default for Mat32

Source§

fn default() -> Self

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

impl Display for Mat32

Source§

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

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

impl Div<&Mat32> for &f32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Mat32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&Mat32> for f32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

fn div(self, rhs: &Mat32) -> Self::Output

Performs the / operation. Read more
Source§

impl Div<&f32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&f32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Mat32> for &f32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<Mat32> for f32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<f32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl DivAssign<&f32> for Mat32

Source§

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

Performs the /= operation. Read more
Source§

impl DivAssign<f32> for Mat32

Source§

fn div_assign(&mut self, rhs: f32)

Performs the /= operation. Read more
Source§

impl FromReflect for Mat32

Source§

fn from_reflect(reflect: &dyn PartialReflect) -> Option<Self>

Constructs a concrete instance of Self from a reflected value.
Source§

fn take_from_reflect( reflect: Box<dyn PartialReflect>, ) -> Result<Self, Box<dyn PartialReflect>>

Attempts to downcast the given value to Self using, constructing the value using from_reflect if that fails. Read more
Source§

impl GetTypeRegistration for Mat32

Source§

fn get_type_registration() -> TypeRegistration

Returns the default TypeRegistration for this type.
Source§

fn register_type_dependencies(registry: &mut TypeRegistry)

Registers other types needed by this type. Read more
Source§

impl Mul<&Mat2> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat2> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat23> for &Mat32

Source§

type Output = Mat3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat23> for Mat32

Source§

type Output = Mat3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for &Mat23

Source§

type Output = Mat2

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for &SymmetricMat3

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for &f32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for Mat23

Source§

type Output = Mat2

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for SymmetricMat3

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Mat32> for f32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SymmetricMat2> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&SymmetricMat2> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vec2> for &Mat32

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&Vec2> for Mat32

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&f32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat2> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat2> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat23> for &Mat32

Source§

type Output = Mat3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat23> for Mat32

Source§

type Output = Mat3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for &Mat23

Source§

type Output = Mat2

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for &SymmetricMat3

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for &f32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for Mat23

Source§

type Output = Mat2

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for SymmetricMat3

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Mat32> for f32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SymmetricMat2> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<SymmetricMat2> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec2> for &Mat32

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<Vec2> for Mat32

Source§

type Output = Vec3

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<f32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl MulAssign<&f32> for Mat32

Source§

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

Performs the *= operation. Read more
Source§

impl MulAssign<f32> for Mat32

Source§

fn mul_assign(&mut self, rhs: f32)

Performs the *= operation. Read more
Source§

impl Neg for &Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl Neg for Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
Source§

impl PartialEq for Mat32

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 PartialReflect for Mat32

Source§

fn get_represented_type_info(&self) -> Option<&'static TypeInfo>

Returns the TypeInfo of the type represented by this value. Read more
Source§

fn try_apply(&mut self, value: &dyn PartialReflect) -> Result<(), ApplyError>

Tries to apply a reflected value to this value. Read more
Source§

fn reflect_kind(&self) -> ReflectKind

Returns a zero-sized enumeration of “kinds” of type. Read more
Source§

fn reflect_ref(&self) -> ReflectRef<'_>

Returns an immutable enumeration of “kinds” of type. Read more
Source§

fn reflect_mut(&mut self) -> ReflectMut<'_>

Returns a mutable enumeration of “kinds” of type. Read more
Source§

fn reflect_owned(self: Box<Self>) -> ReflectOwned

Returns an owned enumeration of “kinds” of type. Read more
Source§

fn try_into_reflect( self: Box<Self>, ) -> Result<Box<dyn Reflect>, Box<dyn PartialReflect>>

Attempts to cast this type to a boxed, fully-reflected value.
Source§

fn try_as_reflect(&self) -> Option<&dyn Reflect>

Attempts to cast this type to a fully-reflected value.
Source§

fn try_as_reflect_mut(&mut self) -> Option<&mut dyn Reflect>

Attempts to cast this type to a mutable, fully-reflected value.
Source§

fn into_partial_reflect(self: Box<Self>) -> Box<dyn PartialReflect>

Casts this type to a boxed, reflected value. Read more
Source§

fn as_partial_reflect(&self) -> &dyn PartialReflect

Casts this type to a reflected value. Read more
Source§

fn as_partial_reflect_mut(&mut self) -> &mut dyn PartialReflect

Casts this type to a mutable, reflected value. Read more
Source§

fn reflect_partial_eq(&self, value: &dyn PartialReflect) -> Option<bool>

Returns a “partial equality” comparison result. Read more
Source§

fn reflect_clone(&self) -> Result<Box<dyn Reflect>, ReflectCloneError>

Attempts to clone Self using reflection. Read more
Source§

fn apply(&mut self, value: &(dyn PartialReflect + 'static))

Applies a reflected value to this value. Read more
Source§

fn to_dynamic(&self) -> Box<dyn PartialReflect>

Converts this reflected value into its dynamic representation based on its kind. Read more
Source§

fn reflect_clone_and_take<T>(&self) -> Result<T, ReflectCloneError>
where T: 'static, Self: Sized + TypePath,

For a type implementing PartialReflect, combines reflect_clone and take in a useful fashion, automatically constructing an appropriate ReflectCloneError if the downcast fails. Read more
Source§

fn reflect_hash(&self) -> Option<u64>

Returns a hash of the value (which includes the type). Read more
Source§

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

Debug formatter for the value. Read more
Source§

fn is_dynamic(&self) -> bool

Indicates whether or not this type is a dynamic type. Read more
Source§

impl Reflect for Mat32

Source§

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

Returns the value as a Box<dyn Any>. Read more
Source§

fn as_any(&self) -> &dyn Any

Returns the value as a &dyn Any. Read more
Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Returns the value as a &mut dyn Any. Read more
Source§

fn into_reflect(self: Box<Self>) -> Box<dyn Reflect>

Casts this type to a boxed, fully-reflected value.
Source§

fn as_reflect(&self) -> &dyn Reflect

Casts this type to a fully-reflected value.
Source§

fn as_reflect_mut(&mut self) -> &mut dyn Reflect

Casts this type to a mutable, fully-reflected value.
Source§

fn set(&mut self, value: Box<dyn Reflect>) -> Result<(), Box<dyn Reflect>>

Performs a type-checked assignment of a reflected value to this value. Read more
Source§

impl Struct for Mat32

Source§

fn field(&self, name: &str) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field named name as a &dyn PartialReflect.
Source§

fn field_mut(&mut self, name: &str) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field named name as a &mut dyn PartialReflect.
Source§

fn field_at(&self, index: usize) -> Option<&dyn PartialReflect>

Returns a reference to the value of the field with index index as a &dyn PartialReflect.
Source§

fn field_at_mut(&mut self, index: usize) -> Option<&mut dyn PartialReflect>

Returns a mutable reference to the value of the field with index index as a &mut dyn PartialReflect.
Source§

fn name_at(&self, index: usize) -> Option<&str>

Returns the name of the field with index index.
Source§

fn field_len(&self) -> usize

Returns the number of fields in the struct.
Source§

fn iter_fields(&self) -> FieldIter<'_>

Returns an iterator over the values of the reflectable fields for this struct.
Source§

fn to_dynamic_struct(&self) -> DynamicStruct

Creates a new DynamicStruct from this struct.
Source§

fn get_represented_struct_info(&self) -> Option<&'static StructInfo>

Will return None if TypeInfo is not available.
Source§

impl Sub<&&Mat32> for &Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&Mat32> for Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for &Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for Mat32

Source§

type Output = Mat32

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl SubAssign<&Mat32> for Mat32

Source§

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

Performs the -= operation. Read more
Source§

impl SubAssign for Mat32

Source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
Source§

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

Source§

fn sum<I: Iterator<Item = &'a Mat32>>(iter: I) -> Self

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

impl Sum for Mat32

Source§

fn sum<I: Iterator<Item = Mat32>>(iter: I) -> Self

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

impl TypePath for Mat32

Source§

fn type_path() -> &'static str

Returns the fully qualified path of the underlying type. Read more
Source§

fn short_type_path() -> &'static str

Returns a short, pretty-print enabled path to the type. Read more
Source§

fn type_ident() -> Option<&'static str>

Returns the name of the type, or None if it is anonymous. Read more
Source§

fn crate_name() -> Option<&'static str>

Returns the name of the crate the type is in, or None if it is anonymous. Read more
Source§

fn module_path() -> Option<&'static str>

Returns the path to the module the type is in, or None if it is anonymous. Read more
Source§

impl Typed for Mat32

Source§

fn type_info() -> &'static TypeInfo

Returns the compile-time info for the underlying type.
Source§

impl Copy for Mat32

Source§

impl StructuralPartialEq for Mat32

Auto Trait Implementations§

§

impl Freeze for Mat32

§

impl RefUnwindSafe for Mat32

§

impl Send for Mat32

§

impl Sync for Mat32

§

impl Unpin for Mat32

§

impl UnwindSafe for Mat32

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

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

impl<T> 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_sync(self: Box<T>) -> Box<dyn Any + Sync + Send>

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 + Sync + Send>

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

impl<T> DynamicTypePath for T
where T: TypePath,

Source§

impl<T> DynamicTyped for T
where T: Typed,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> GetField for S
where S: Struct,

Source§

fn get_field<T>(&self, name: &str) -> Option<&T>
where T: Reflect,

Returns a reference to the value of the field named name, downcast to T.
Source§

fn get_field_mut<T>(&mut self, name: &str) -> Option<&mut T>
where T: Reflect,

Returns a mutable reference to the value of the field named name, downcast to T.
Source§

impl<T> GetPath for T
where T: Reflect + ?Sized,

Source§

fn reflect_path<'p>( &self, path: impl ReflectPath<'p>, ) -> Result<&(dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a reference to the value specified by path. Read more
Source§

fn reflect_path_mut<'p>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut (dyn PartialReflect + 'static), ReflectPathError<'p>>

Returns a mutable reference to the value specified by path. Read more
Source§

fn path<'p, T>( &self, path: impl ReflectPath<'p>, ) -> Result<&T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed reference to the value specified by path. Read more
Source§

fn path_mut<'p, T>( &mut self, path: impl ReflectPath<'p>, ) -> Result<&mut T, ReflectPathError<'p>>
where T: Reflect,

Returns a statically typed mutable reference to the value specified by path. 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<A> Is for A
where A: Any,

Source§

fn is<T>() -> bool
where T: Any,

Checks if the current type “is” another type, using a TypeId equality comparison. This is most useful in the context of generic logic. Read more
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> 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, 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> TypeData for T
where T: 'static + Send + Sync + Clone,

Source§

fn clone_type_data(&self) -> Box<dyn TypeData>

Creates a type-erased clone of this value.
Source§

impl<T> Reflectable for T