pub struct Matrix<T = f64>where
    T: Number,{ /* private fields */ }
Expand description

Matrix

use opensrdk_linear_algebra::*;

let a = mat!(
  1.0, 2.0;
  3.0, 4.0
);
assert_eq!(a[0], [1.0, 3.0]);
assert_eq!(a[1], [2.0, 4.0]);

assert_eq!(a[(0, 0)], 1.0);
assert_eq!(a[(0, 1)], 2.0);
assert_eq!(a[(1, 0)], 3.0);
assert_eq!(a[(1, 1)], 4.0);

Implementations§

source§

impl Matrix

source

pub fn posv_cgm( vec_mul: &dyn Fn(Vec<f64>) -> Result<Vec<f64>, Box<dyn Error + Send + Sync>>, b: Vec<f64>, iterations: usize ) -> Result<Vec<f64>, MatrixError>

source§

impl Matrix

source

pub fn potrf(self) -> Result<POTRF, MatrixError>

Cholesky decomposition

for positive definite f64 matrix

https://en.wikipedia.org/wiki/Cholesky_decomposition

A = L * L^T

source§

impl Matrix<c64>

source

pub fn potrf(self) -> Result<POTRF<c64>, MatrixError>

Cholesky decomposition

for positive definite c64 matrix

https://en.wikipedia.org/wiki/Cholesky_decomposition

A = L * L^*

source§

impl Matrix

source

pub fn sytrd(self) -> Result<SYTRD, MatrixError>

Tridiagonalize

for symmetric matrix

source

pub fn sytrd_k( n: usize, k: usize, vec_mul: &dyn Fn(Vec<f64>) -> Result<Vec<f64>, Box<dyn Error + Send + Sync>>, probe: Option<&[f64]> ) -> Result<(Matrix, SymmetricTridiagonalMatrix), MatrixError>

Lanczos algorithm

for symmetric matrix only k iteration

source§

impl Matrix

source§

impl Matrix<c64>

source§

impl<T> Matrix<T>where T: Number,

source

pub fn trdet(&self) -> T

Determinant

for triangle matrix To apply this method to none triangle matrix, use LU decomposition or Cholesky decomposition.

source§

impl Matrix

source

pub fn gemm( self, lhs: &Matrix, rhs: &Matrix, alpha: f64, beta: f64 ) -> Result<Matrix, MatrixError>

C = self A = lhs B = rhs return alpha*op( A )op( B ) + betaC,

source§

impl Matrix<c64>

source

pub fn gemm( self, lhs: &Matrix<c64>, rhs: &Matrix<c64>, alpha: c64, beta: c64 ) -> Result<Matrix<c64>, MatrixError>

source§

impl Matrix<c64>

source

pub fn adjoint(&self) -> Matrix<c64>

source§

impl<T> Matrix<T>where T: Number,

source

pub fn linear_prod(&self, rhs: &Matrix<T>) -> T

source

pub fn hadamard_prod(self, rhs: &Matrix<T>) -> Matrix<T>

source§

impl<T> Matrix<T>where T: Number,

source

pub fn t(&self) -> Matrix<T>

source§

impl<T> Matrix<T>where T: Number,

source

pub fn tr(&self) -> T

source§

impl Matrix

source

pub fn gesvd(self) -> Result<(Matrix, Matrix, Matrix), MatrixError>

Singular Value Decomposition

https://en.wikipedia.org/wiki/Singular_value_decomposition

M = U * Sigma * V^T (u, sigma, vt)

source§

impl Matrix

source§

impl Matrix<c64>

source§

impl<T> Matrix<T>where T: Number,

source

pub fn new(rows: usize, cols: usize) -> Self

source

pub fn from(rows: usize, elems: Vec<T>) -> Result<Self, MatrixError>

You can do unwrap() if you have a conviction that elems.len() % rows == 0

source

pub fn is_same_size(&self, other: &Matrix<T>) -> bool

source

pub fn rows(&self) -> usize

source

pub fn cols(&self) -> usize

source

pub fn vec(self) -> Vec<T>

source

pub fn elems(&self) -> &[T]

source

pub fn elems_mut(&mut self) -> &mut [T]

source

pub fn reshape(self, rows: usize) -> Self

source

pub fn eject_row(&self, index: usize) -> Vec<T>

source

pub fn eject_sub_matrix( &self, start_i: usize, start_j: usize, rows: usize, cols: usize ) -> Matrix<T>

source§

impl Matrix<f64>

source

pub fn to_complex(&self) -> Matrix<c64>

source§

impl Matrix<c64>

source

pub fn to_real(&self) -> (Matrix<f64>, Matrix<f64>)

Trait Implementations§

source§

impl Add<&Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T> Add<&DiagonalMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<&Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<&Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<&f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T> Add<DiagonalMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<Complex<f64>>> for &Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<Complex<f64>>> for &c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<Complex<f64>>> for c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T> Add<Matrix<T>> for &DiagonalMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T> Add<Matrix<T>> for DiagonalMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<f64>> for &Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<f64>> for &f64

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<Matrix<f64>> for f64

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<T> Clone for Matrix<T>where T: Number + Clone,

source§

fn clone(&self) -> Matrix<T>

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

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

Performs copy-assignment from source. Read more
source§

impl<T> Debug for Matrix<T>where T: Number + Debug,

source§

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

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

impl<T> Default for Matrix<T>where T: Number + Default,

source§

fn default() -> Matrix<T>

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

impl Div<&Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<&f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl Div<f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl<T> Hash for Matrix<T>where T: Number + Hash,

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl<T> Index<(usize, usize)> for Matrix<T>where T: Number,

§

type Output = T

The returned type after indexing.
source§

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

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

impl<T> Index<usize> for Matrix<T>where T: Number,

§

type Output = [T]

The returned type after indexing.
source§

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

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

impl<T> IndexMut<(usize, usize)> for Matrix<T>where T: Number,

source§

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

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

impl<T> IndexMut<usize> for Matrix<T>where T: Number,

source§

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

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

impl Mul<&Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<&Matrix<Complex<f64>>> for &Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<c64>) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Mul<&Matrix<T>> for &SparseMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Mul<&Matrix<T>> for SparseMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<T>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Matrix<f64>> for &Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &Matrix<f64>) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Mul<&SparseMatrix<T>> for &Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SparseMatrix<T>) -> Self::Output

Performs the * operation. Read more
source§

impl<T> Mul<&SparseMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: &SparseMatrix<T>) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<&f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<Complex<f64>>> for &Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<Complex<f64>>> for &c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<Complex<f64>>> for c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T> Mul<Matrix<T>> for &SparseMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T> Mul<Matrix<T>> for SparseMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<f64>> for &Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<f64>> for &f64

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<Matrix<f64>> for f64

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T> Mul<SparseMatrix<T>> for &Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T> Mul<SparseMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl Mul<f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<T> Neg for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<T> PartialEq<Matrix<T>> for Matrix<T>where T: Number + PartialEq,

source§

fn eq(&self, other: &Matrix<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<&Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T> Sub<&DiagonalMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<&Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<&Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<&f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Complex<f64>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T> Sub<DiagonalMatrix<T>> for Matrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<Complex<f64>>> for &Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<Complex<f64>>> for &c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<Complex<f64>>> for Matrix<c64>

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<Complex<f64>>> for c64

§

type Output = Matrix<Complex<f64>>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T> Sub<Matrix<T>> for &DiagonalMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T> Sub<Matrix<T>> for DiagonalMatrix<T>where T: Number,

§

type Output = Matrix<T>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<f64>> for &Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<f64>> for &f64

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<f64>> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<Matrix<f64>> for f64

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<f64> for Matrix<f64>

§

type Output = Matrix<f64>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<T> SubMatrix<T> for &Matrix<T>where T: Number,

source§

fn size(&self) -> (usize, usize)

source§

fn index(&self, i: usize, j: usize) -> T

source§

impl<T> SubMatrix<T> for Matrix<T>where T: Number,

source§

fn size(&self) -> (usize, usize)

source§

fn index(&self, i: usize, j: usize) -> T

source§

impl<T> Tensor<T> for Matrix<T>where T: Number,

source§

fn rank(&self) -> usize

source§

fn size(&self, level: usize) -> usize

source§

fn elem(&self, indices: &[usize]) -> T

source§

fn elem_mut(&mut self, indices: &[usize]) -> &mut T

source§

impl<T> StructuralPartialEq for Matrix<T>where T: Number,

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for Matrix<T>where T: RefUnwindSafe,

§

impl<T> Send for Matrix<T>

§

impl<T> Sync for Matrix<T>

§

impl<T> Unpin for Matrix<T>where T: Unpin,

§

impl<T> UnwindSafe for Matrix<T>where T: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

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

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

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

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V