Struct arr_rs::arrays::Array

source ·
pub struct Array<N: Numeric> { /* private fields */ }
Expand description

Array structure definition

Trait Implementations§

source§

impl<N: NumericOps> Add<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl<N: NumericOps> Add<N> for Array<N>

§

type Output = Result<Array<N>, ArrayError>

The resulting type after applying the + operator.
source§

fn add(self, other: N) -> Self::Output

Performs the + operation. Read more
source§

impl<N: NumericOps> AddAssign<Array<N>> for Array<N>

source§

fn add_assign(&mut self, other: Self)

Performs the += operation. Read more
source§

impl<N: NumericOps> AddAssign<N> for Array<N>

source§

fn add_assign(&mut self, other: N)

Performs the += operation. Read more
source§

impl<N: Numeric> ArrayAxis<N> for Array<N>

source§

fn transpose(&self, axes: Option<Vec<isize>>) -> Result<Self, ArrayError>

Returns an array with axes transposed Read more
source§

fn moveaxis( &self, source: Vec<isize>, destination: Vec<isize> ) -> Result<Self, ArrayError>

Move axes of an array to new positions Read more
source§

fn rollaxis( &self, axis: isize, start: Option<isize> ) -> Result<Self, ArrayError>

Roll the specified axis backwards, until it lies in a given position Read more
source§

fn swapaxes(&self, axis_1: isize, axis_2: isize) -> Result<Self, ArrayError>

Interchange two axes of an array Read more
source§

fn expand_dims(&self, axes: Vec<isize>) -> Result<Self, ArrayError>

Expand the shape of an array Read more
source§

fn squeeze(&self, axes: Option<Vec<isize>>) -> Result<Self, ArrayError>

Remove axes of length one from array Read more
source§

impl<N: Numeric> ArrayBroadcast<N> for Array<N>

source§

fn broadcast(&self, other: &Array<N>) -> Result<Array<Tuple2<N>>, ArrayError>

Broadcast an array to a new shape Read more
source§

fn broadcast_to(&self, shape: Vec<usize>) -> Result<Array<N>, ArrayError>

Broadcast an array to a new shape Read more
source§

fn broadcast_arrays(arrays: Vec<Array<N>>) -> Result<Vec<Array<N>>, ArrayError>

Broadcast a list of arrays to a common shape Read more
source§

impl<N: Numeric> ArrayCreate<N> for Array<N>

source§

fn new(elements: Vec<N>, shape: Vec<usize>) -> Result<Array<N>, ArrayError>

Creates new array Read more
source§

fn single(element: N) -> Result<Self, ArrayError>

Creates new array with single element Read more
source§

fn flat(elements: Vec<N>) -> Result<Self, ArrayError>

Creates new flat array Read more
source§

fn rand(shape: Vec<usize>) -> Result<Self, ArrayError>

Creates new array with random elements from (0 ..= 1) range Read more
source§

fn empty() -> Result<Self, ArrayError>

Creates new empty array Read more
source§

fn eye(n: usize, m: Option<usize>, k: Option<usize>) -> Result<Self, ArrayError>

Creates new 2d array with ones on the diagonal and zeros elsewhere Read more
source§

fn identity(n: usize) -> Result<Self, ArrayError>

Creates new identity 2d array Read more
source§

fn zeros(shape: Vec<usize>) -> Result<Self, ArrayError>

Creates new array of zeros Read more
source§

fn zeros_like(other: &Self) -> Result<Self, ArrayError>

Creates new array of zeros like other array Read more
source§

fn ones(shape: Vec<usize>) -> Result<Self, ArrayError>

Creates new array of ones Read more
source§

fn ones_like(other: &Self) -> Result<Self, ArrayError>

Creates new array of ones like other array Read more
source§

fn full(shape: Vec<usize>, fill_value: N) -> Result<Self, ArrayError>

Creates new array of fill_value Read more
source§

fn full_like(other: &Self, fill_value: N) -> Result<Self, ArrayError>

Creates new array of fill_value like other array Read more
source§

fn arange(start: N, stop: N, step: Option<N>) -> Result<Self, ArrayError>

Creates new array from range Read more
source§

fn linspace( start: N, stop: N, num: Option<usize>, endpoint: Option<bool> ) -> Result<Self, ArrayError>

Creates new array of numbers evenly spaced over a specified interval Read more
source§

fn linspace_a( start: &Self, stop: &Self, num: Option<usize>, endpoint: Option<bool> ) -> Result<Array<N>, ArrayError>

Creates new array of numbers evenly spaced over a specified interval Read more
source§

fn logspace( start: N, stop: N, num: Option<usize>, endpoint: Option<bool>, base: Option<usize> ) -> Result<Self, ArrayError>

Creates new array of numbers evenly spaced on a log scale over a specified interval Read more
source§

fn logspace_a( start: &Self, stop: &Self, num: Option<usize>, endpoint: Option<bool>, base: Option<&Array<usize>> ) -> Result<Array<N>, ArrayError>

Creates new array of numbers evenly spaced on a log scale over a specified interval Read more
source§

fn geomspace( start: N, stop: N, num: Option<usize>, endpoint: Option<bool> ) -> Result<Array<N>, ArrayError>

Creates new array of numbers evenly spaced on a log scale (a geometric progression) over a specified interval Read more
source§

fn geomspace_a( start: &Self, stop: &Self, num: Option<usize>, endpoint: Option<bool> ) -> Result<Array<N>, ArrayError>

Creates new array of numbers evenly spaced on a log scale (a geometric progression) over a specified interval Read more
source§

fn tri( n: usize, m: Option<usize>, k: Option<isize> ) -> Result<Array<N>, ArrayError>

Construct an array with ones at and below the given diagonal and zeros elsewhere Read more
source§

impl<N: Numeric> ArrayCreateFrom<N> for Array<N>

source§

fn diag(&self, k: Option<isize>) -> Result<Array<N>, ArrayError>

Extract a diagonal or construct a diagonal array Read more
source§

fn diagflat(&self, k: Option<isize>) -> Result<Array<N>, ArrayError>

Construct a diagonal array for flattened input Read more
source§

fn tril(&self, k: Option<isize>) -> Result<Array<N>, ArrayError>

Return a copy of an array with elements above the k-th diagonal zeroed. For arrays with ndim exceeding 2, tril will apply to the final two axes. Read more
source§

fn triu(&self, k: Option<isize>) -> Result<Array<N>, ArrayError>

Return a copy of an array with elements below the k-th diagonal zeroed. For arrays with ndim exceeding 2, triu will apply to the final two axes. Read more
source§

fn vander( &self, n: Option<usize>, increasing: Option<bool> ) -> Result<Array<N>, ArrayError>

Generate a Vandermonde matrix Read more
source§

impl<N: Numeric> ArrayIndexing<N> for Array<N>

source§

fn index_at(&self, coords: &[usize]) -> Result<usize, ArrayError>

Return an index of element at the given coordinates Read more
source§

fn index_to_coord(&self, idx: usize) -> Result<Vec<usize>, ArrayError>

Return coordinates at the given index of element Read more
source§

fn at(&self, coords: &[usize]) -> Result<N, ArrayError>

Return an index of element at the given coordinates Read more
source§

fn slice(&self, range: Range<usize>) -> Result<Self, ArrayError>

Return a subarray of provided range Read more
source§

impl<N: Numeric> ArrayIter<N> for Array<N>

source§

fn for_each<F: FnMut(&N)>(&self, f: F) -> Result<(), ArrayError>

Loop over array elements Read more
source§

fn for_each_e<F: FnMut(usize, &N)>(&self, f: F) -> Result<(), ArrayError>

Loop over enumerated array elements Read more
source§

fn map<F: FnMut(&N) -> N>(&self, f: F) -> Result<Array<N>, ArrayError>

Map over array elements Read more
source§

fn map_e<F: FnMut(usize, &N) -> N>(&self, f: F) -> Result<Array<N>, ArrayError>

Map over enumerated array elements Read more
source§

fn filter<F: FnMut(&N) -> bool>(&self, f: F) -> Result<Array<N>, ArrayError>

Filter over array elements Returns a flat filtered array Read more
source§

fn filter_e<F: FnMut(usize, &N) -> bool>( &self, f: F ) -> Result<Array<N>, ArrayError>

Filter over enumerated array elements Returns a flat filtered array Read more
source§

fn filter_map<F: FnMut(&N) -> Option<N>>( &self, f: F ) -> Result<Array<N>, ArrayError>

Filter and map over array elements Returns a flat filtered array Read more
source§

fn filter_map_e<F: FnMut(usize, &N) -> Option<N>>( &self, f: F ) -> Result<Array<N>, ArrayError>

Filter and map over enumerated array elements Returns a flat filtered array Read more
source§

fn fold<F: FnMut(&N, &N) -> N>(&self, init: N, f: F) -> Result<N, ArrayError>

Fold elements of array elements Read more
source§

impl<N: Numeric> ArrayManipulate<N> for Array<N>

source§

fn insert( &self, indices: Vec<usize>, values: &Self, axis: Option<usize> ) -> Result<Array<N>, ArrayError>

Insert values along the given axis for the given indices Read more
source§

fn delete( &self, indices: Vec<usize>, axis: Option<usize> ) -> Result<Array<N>, ArrayError>

Delete values along the given axis Read more
source§

fn append( &self, values: &Self, axis: Option<usize> ) -> Result<Array<N>, ArrayError>

Append values to the end of an array Read more
source§

fn reshape(&self, shape: Vec<usize>) -> Result<Array<N>, ArrayError>

Reshapes an array Read more
source§

fn resize(&self, shape: Vec<usize>) -> Result<Array<N>, ArrayError>

Resizes an array, Read more
source§

fn unique(&self, axis: Option<usize>) -> Result<Array<N>, ArrayError>

Find the unique elements of an array, Read more
source§

fn ravel(&self) -> Result<Array<N>, ArrayError>

Return a contiguous flattened array Read more
source§

fn atleast(&self, n: usize) -> Result<Array<N>, ArrayError>

Convert array to at least n dimension Read more
source§

fn trim_zeros(&self) -> Result<Array<N>, ArrayError>

Trim the leading and/or trailing zeros from a 1D array Read more
source§

impl<N: Numeric> ArrayMath<N> for Array<N>

source§

fn power(&self, value: N) -> Result<Array<N>, ArrayError>

Computes power of array elements Read more
source§

fn product(&self) -> Result<N, ArrayError>

Multiplication of array elements Read more
source§

fn sum(&self) -> Result<N, ArrayError>

Sum of array elements Read more
source§

fn cumsum(&self) -> Result<Array<N>, ArrayError>

Cumulative sum of array elements Read more
source§

impl<N: Numeric> ArrayMeta<N> for Array<N>

source§

fn get_elements(&self) -> Result<Vec<N>, ArrayError>

Obtain the vector containing array elements Read more
source§

fn get_shape(&self) -> Result<Vec<usize>, ArrayError>

Obtain the vector containing array shape Read more
source§

fn ndim(&self) -> Result<usize, ArrayError>

Count of array dimensions Read more
source§

fn len(&self) -> Result<usize, ArrayError>

Count of array elements Read more
source§

fn is_empty(&self) -> Result<bool, ArrayError>

Check if array element count equals zero Read more
source§

impl<N: Numeric> ArrayReorder<N> for Array<N>

source§

fn flip(&self, axes: Option<Vec<isize>>) -> Result<Array<N>, ArrayError>

Reverse the order of elements in an array along the given axis Read more
source§

fn flipud(&self) -> Result<Array<N>, ArrayError>

Reverse the order of elements along axis 0 (up/down) Read more
source§

fn fliplr(&self) -> Result<Array<N>, ArrayError>

Reverse the order of elements along axis 1 (left/right) Read more
source§

fn roll( &self, shift: Vec<isize>, axes: Option<Vec<isize>> ) -> Result<Array<N>, ArrayError>

Roll array elements along a given axis Read more
source§

fn rot90(&self, k: usize, axes: Vec<isize>) -> Result<Array<N>, ArrayError>

Rotate an array by 90 degrees in the plane specified by axes. Rotation direction is from the first towards the second axis. Read more
source§

impl<N: Numeric> ArraySplit<N> for Array<N>

source§

fn array_split( &self, parts: usize, axis: Option<usize> ) -> Result<Vec<Array<N>>, ArrayError>

Split an array into multiple sub-arrays Read more
source§

fn split( &self, parts: usize, axis: Option<usize> ) -> Result<Vec<Array<N>>, ArrayError>

Split an array into multiple sub-arrays of equal size Read more
source§

fn hsplit(&self, parts: usize) -> Result<Vec<Array<N>>, ArrayError>

Split an array into multiple sub-arrays horizontally (column-wise) Read more
source§

fn vsplit(&self, parts: usize) -> Result<Vec<Array<N>>, ArrayError>

Split an array into multiple sub-arrays vertically (row-wise) Read more
source§

fn dsplit(&self, parts: usize) -> Result<Vec<Array<N>>, ArrayError>

Split an array into multiple sub-arrays along the 3rd axis (depth) Read more
source§

impl<N: Numeric> ArrayStack<N> for Array<N>

source§

fn concatenate(arrs: Vec<Self>, axis: Option<usize>) -> Result<Self, ArrayError>

Join a sequence of arrays along an existing axis Read more
source§

fn stack(arrs: Vec<Self>, axis: Option<usize>) -> Result<Self, ArrayError>

Join a sequence of arrays along a new axis Read more
source§

fn vstack(arrs: Vec<Self>) -> Result<Self, ArrayError>

Stack arrays in sequence vertically (row wise) Read more
source§

fn hstack(arrs: Vec<Self>) -> Result<Self, ArrayError>

Stack arrays in sequence horizontally (column wise) Read more
source§

fn dstack(arrs: Vec<Self>) -> Result<Self, ArrayError>

Stack arrays in sequence depth wise (along third axis) Read more
source§

fn column_stack(arrs: Vec<Self>) -> Result<Self, ArrayError>

Stack 1d or 2d arrays as columns into a 2d array row_stack is an alias for vstack Read more
source§

fn row_stack(arrs: Vec<Self>) -> Result<Self, ArrayError>

Stack arrays in sequence vertically (row wise) Read more
source§

impl<N: Numeric + BitAnd<Output = N>> BitAnd<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the & operator.
source§

fn bitand(self, other: Array<N>) -> Self::Output

Performs the & operation. Read more
source§

impl<N: Numeric + BitAnd<Output = N>> BitAnd<N> for Array<N>

§

type Output = Array<N>

The resulting type after applying the & operator.
source§

fn bitand(self, other: N) -> Self::Output

Performs the & operation. Read more
source§

impl<N: Numeric + BitAnd<Output = N>> BitAndAssign<Array<N>> for Array<N>

source§

fn bitand_assign(&mut self, other: Array<N>)

Performs the &= operation. Read more
source§

impl<N: Numeric + BitAnd<Output = N>> BitAndAssign<N> for Array<N>

source§

fn bitand_assign(&mut self, other: N)

Performs the &= operation. Read more
source§

impl<N: Numeric + BitOr<Output = N>> BitOr<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the | operator.
source§

fn bitor(self, other: Array<N>) -> Self::Output

Performs the | operation. Read more
source§

impl<N: Numeric + BitOr<Output = N>> BitOr<N> for Array<N>

§

type Output = Array<N>

The resulting type after applying the | operator.
source§

fn bitor(self, other: N) -> Self::Output

Performs the | operation. Read more
source§

impl<N: Numeric + BitOr<Output = N>> BitOrAssign<Array<N>> for Array<N>

source§

fn bitor_assign(&mut self, other: Array<N>)

Performs the |= operation. Read more
source§

impl<N: Numeric + BitOr<Output = N>> BitOrAssign<N> for Array<N>

source§

fn bitor_assign(&mut self, other: N)

Performs the |= operation. Read more
source§

impl<N: Numeric + BitXor<Output = N>> BitXor<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: Array<N>) -> Self::Output

Performs the ^ operation. Read more
source§

impl<N: Numeric + BitXor<Output = N>> BitXor<N> for Array<N>

§

type Output = Array<N>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, other: N) -> Self::Output

Performs the ^ operation. Read more
source§

impl<N: Numeric + BitXor<Output = N>> BitXorAssign<Array<N>> for Array<N>

source§

fn bitxor_assign(&mut self, other: Array<N>)

Performs the ^= operation. Read more
source§

impl<N: Numeric + BitXor<Output = N>> BitXorAssign<N> for Array<N>

source§

fn bitxor_assign(&mut self, other: N)

Performs the ^= operation. Read more
source§

impl<N: Clone + Numeric> Clone for Array<N>

source§

fn clone(&self) -> Array<N>

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<N: Debug + Numeric> Debug for Array<N>

source§

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

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

impl<N: Numeric> Display for Array<N>

source§

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

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

impl<N: NumericOps> Div<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the / operator.
source§

fn div(self, other: Self) -> Self::Output

Performs the / operation. Read more
source§

impl<N: NumericOps> Div<N> for Array<N>

§

type Output = Result<Array<N>, ArrayError>

The resulting type after applying the / operator.
source§

fn div(self, other: N) -> Self::Output

Performs the / operation. Read more
source§

impl<N: NumericOps> DivAssign<Array<N>> for Array<N>

source§

fn div_assign(&mut self, other: Self)

Performs the /= operation. Read more
source§

impl<N: NumericOps> DivAssign<N> for Array<N>

source§

fn div_assign(&mut self, other: N)

Performs the /= operation. Read more
source§

impl<N: Numeric> FromIterator<N> for Array<N>

source§

fn from_iter<T: IntoIterator<Item = N>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl<N: Numeric> Index<&[usize]> for Array<N>

§

type Output = N

The returned type after indexing.
source§

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

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

impl<N: Numeric> Index<usize> for Array<N>

§

type Output = N

The returned type after indexing.
source§

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

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

impl<N: Numeric> IndexMut<&[usize]> for Array<N>

source§

fn index_mut(&mut self, coords: &[usize]) -> &mut Self::Output

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

impl<N: Numeric> IndexMut<usize> for Array<N>

source§

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

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

impl<'a, N: Numeric> IntoIterator for &'a Array<N>

§

type Item = &'a N

The type of the elements being iterated over.
§

type IntoIter = Iter<'a, N>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<N: Numeric> IntoIterator for Array<N>

§

type Item = N

The type of the elements being iterated over.
§

type IntoIter = IntoIter<N, Global>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<N: NumericOps> Mul<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl<N: NumericOps> Mul<N> for Array<N>

§

type Output = Result<Array<N>, ArrayError>

The resulting type after applying the * operator.
source§

fn mul(self, other: N) -> Self::Output

Performs the * operation. Read more
source§

impl<N: NumericOps> MulAssign<Array<N>> for Array<N>

source§

fn mul_assign(&mut self, other: Self)

Performs the *= operation. Read more
source§

impl<N: NumericOps> MulAssign<N> for Array<N>

source§

fn mul_assign(&mut self, other: N)

Performs the *= operation. Read more
source§

impl<N: SignedNumeric> Neg for Array<N>

§

type Output = Array<N>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<N: BoolNumeric + From<<N as Not>::Output>> Not for Array<N>

§

type Output = Array<N>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<N: Numeric> PartialEq<Array<N>> for Array<N>

source§

fn eq(&self, other: &Self) -> 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<N: Numeric> PartialOrd<Array<N>> for Array<N>

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
source§

fn lt(&self, other: &Self) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
source§

fn le(&self, other: &Self) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
source§

fn gt(&self, other: &Self) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
source§

fn ge(&self, other: &Self) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<N: NumericOps> Rem<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the % operator.
source§

fn rem(self, other: Self) -> Self::Output

Performs the % operation. Read more
source§

impl<N: NumericOps> Rem<N> for Array<N>

§

type Output = Result<Array<N>, ArrayError>

The resulting type after applying the % operator.
source§

fn rem(self, other: N) -> Self::Output

Performs the % operation. Read more
source§

impl<N: NumericOps> RemAssign<Array<N>> for Array<N>

source§

fn rem_assign(&mut self, other: Self)

Performs the %= operation. Read more
source§

impl<N: NumericOps> RemAssign<N> for Array<N>

source§

fn rem_assign(&mut self, other: N)

Performs the %= operation. Read more
source§

impl<N: NumericOps> Sub<Array<N>> for Array<N>

§

type Output = Array<N>

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl<N: NumericOps> Sub<N> for Array<N>

§

type Output = Result<Array<N>, ArrayError>

The resulting type after applying the - operator.
source§

fn sub(self, other: N) -> Self::Output

Performs the - operation. Read more
source§

impl<N: NumericOps> SubAssign<Array<N>> for Array<N>

source§

fn sub_assign(&mut self, other: Self)

Performs the -= operation. Read more
source§

impl<N: NumericOps> SubAssign<N> for Array<N>

source§

fn sub_assign(&mut self, other: N)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<N> RefUnwindSafe for Array<N>where N: RefUnwindSafe,

§

impl<N> Send for Array<N>where N: Send,

§

impl<N> Sync for Array<N>where N: Sync,

§

impl<N> Unpin for Array<N>where N: Unpin,

§

impl<N> UnwindSafe for Array<N>where N: 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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> 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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.
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.
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