pub struct Dynamic { /* private fields */ }
Expand description

Dim of dynamically-sized algebraic entities.

Implementations§

source§

impl Dynamic

source

pub const fn new(value: usize) -> Dynamic

A dynamic size equal to value.

Trait Implementations§

source§

impl Add<usize> for Dynamic

§

type Output = Dynamic

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Dynamic

Performs the + operation. Read more
source§

impl<T, C> Allocator<T, Dynamic, C> for DefaultAllocatorwhere T: Scalar, C: Dim,

§

type Buffer = VecStorage<T, Dynamic, C>

The type of buffer this allocator can instanciate.
§

type BufferUninit = VecStorage<MaybeUninit<T>, Dynamic, C>

The type of buffer with uninitialized components this allocator can instanciate.
source§

fn allocate_uninit( nrows: Dynamic, ncols: C ) -> VecStorage<MaybeUninit<T>, Dynamic, C>

Allocates a buffer with the given number of rows and columns without initializing its content.
source§

unsafe fn assume_init( uninit: VecStorage<MaybeUninit<T>, Dynamic, C> ) -> VecStorage<T, Dynamic, C>

Assumes a data buffer to be initialized. Read more
source§

fn allocate_from_iterator<I>( nrows: Dynamic, ncols: C, iter: I ) -> <DefaultAllocator as Allocator<T, Dynamic, C>>::Bufferwhere I: IntoIterator<Item = T>,

Allocates a buffer initialized with the content of the given iterator.
source§

impl<T, R> Allocator<T, R, Dynamic> for DefaultAllocatorwhere T: Scalar, R: DimName,

§

type Buffer = VecStorage<T, R, Dynamic>

The type of buffer this allocator can instanciate.
§

type BufferUninit = VecStorage<MaybeUninit<T>, R, Dynamic>

The type of buffer with uninitialized components this allocator can instanciate.
source§

fn allocate_uninit( nrows: R, ncols: Dynamic ) -> VecStorage<MaybeUninit<T>, R, Dynamic>

Allocates a buffer with the given number of rows and columns without initializing its content.
source§

unsafe fn assume_init( uninit: VecStorage<MaybeUninit<T>, R, Dynamic> ) -> VecStorage<T, R, Dynamic>

Assumes a data buffer to be initialized. Read more
source§

fn allocate_from_iterator<I>( nrows: R, ncols: Dynamic, iter: I ) -> <DefaultAllocator as Allocator<T, R, Dynamic>>::Bufferwhere I: IntoIterator<Item = T>,

Allocates a buffer initialized with the content of the given iterator.
source§

impl Clone for Dynamic

source§

fn clone(&self) -> Dynamic

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

source§

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

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

impl<'de> Deserialize<'de> for Dynamic

source§

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

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

impl Dim for Dynamic

source§

fn try_to_usize() -> Option<usize>

Gets the compile-time value of Self. Returns None if it is not known, i.e., if Self = Dynamic.
source§

fn from_usize(dim: usize) -> Dynamic

Builds an instance of Self from a run-time value. Panics if Self is a type-level integer and dim != Self::try_to_usize().unwrap().
source§

fn value(&self) -> usize

Gets the run-time value of self. For type-level integers, this is the same as Self::try_to_usize().unwrap().
source§

fn is<D>() -> boolwhere D: Dim,

source§

impl<D> DimAdd<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn add(self, other: D) -> Dynamic

source§

impl<D> DimDiv<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn div(self, other: D) -> Dynamic

source§

impl<D> DimEq<D, Dynamic> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> DimEq<Dynamic, D> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> DimMax<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn max(self, other: D) -> Dynamic

source§

impl<D> DimMin<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn min(self, other: D) -> Dynamic

source§

impl<D> DimMul<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn mul(self, other: D) -> Dynamic

source§

impl<D> DimSub<D> for Dynamicwhere D: Dim,

§

type Output = Dynamic

source§

fn sub(self, other: D) -> Dynamic

source§

impl PartialEq<Dynamic> for Dynamic

source§

fn eq(&self, other: &Dynamic) -> 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<T, C> RawStorage<T, Dynamic, C> for VecStorage<T, Dynamic, C>where C: Dim,

§

type RStride = Const<1>

The static stride of this storage’s rows.
§

type CStride = Dynamic

The static stride of this storage’s columns.
source§

fn ptr(&self) -> *const T

The matrix data pointer.
source§

fn shape(&self) -> (Dynamic, C)

The dimension of the matrix at run-time. Arr length of zero indicates the additive identity element of any dimension. Must be equal to Self::dimension() if it is not None.
source§

fn strides( &self ) -> (<VecStorage<T, Dynamic, C> as RawStorage<T, Dynamic, C>>::RStride, <VecStorage<T, Dynamic, C> as RawStorage<T, Dynamic, C>>::CStride)

The spacing between consecutive row elements and consecutive column elements. Read more
source§

fn is_contiguous(&self) -> bool

Indicates whether this data buffer stores its elements contiguously. Read more
source§

unsafe fn as_slice_unchecked(&self) -> &[T]

Retrieves the data buffer as a contiguous slice. Read more
source§

fn linear_index(&self, irow: usize, icol: usize) -> usize

Compute the index corresponding to the irow-th row and icol-th column of this matrix. The index must be such that the following holds: Read more
source§

fn get_address_unchecked_linear(&self, i: usize) -> *const T

Gets the address of the i-th matrix component without performing bound-checking. Read more
source§

fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const T

Gets the address of the i-th matrix component without performing bound-checking. Read more
source§

unsafe fn get_unchecked_linear(&self, i: usize) -> &T

Retrieves a reference to the i-th element without bound-checking. Read more
source§

unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &T

Retrieves a reference to the i-th element without bound-checking. Read more
source§

impl<T, R> RawStorage<T, R, Dynamic> for VecStorage<T, R, Dynamic>where R: DimName,

§

type RStride = Const<1>

The static stride of this storage’s rows.
§

type CStride = R

The static stride of this storage’s columns.
source§

fn ptr(&self) -> *const T

The matrix data pointer.
source§

fn shape(&self) -> (R, Dynamic)

The dimension of the matrix at run-time. Arr length of zero indicates the additive identity element of any dimension. Must be equal to Self::dimension() if it is not None.
source§

fn strides( &self ) -> (<VecStorage<T, R, Dynamic> as RawStorage<T, R, Dynamic>>::RStride, <VecStorage<T, R, Dynamic> as RawStorage<T, R, Dynamic>>::CStride)

The spacing between consecutive row elements and consecutive column elements. Read more
source§

fn is_contiguous(&self) -> bool

Indicates whether this data buffer stores its elements contiguously. Read more
source§

unsafe fn as_slice_unchecked(&self) -> &[T]

Retrieves the data buffer as a contiguous slice. Read more
source§

fn linear_index(&self, irow: usize, icol: usize) -> usize

Compute the index corresponding to the irow-th row and icol-th column of this matrix. The index must be such that the following holds: Read more
source§

fn get_address_unchecked_linear(&self, i: usize) -> *const T

Gets the address of the i-th matrix component without performing bound-checking. Read more
source§

fn get_address_unchecked(&self, irow: usize, icol: usize) -> *const T

Gets the address of the i-th matrix component without performing bound-checking. Read more
source§

unsafe fn get_unchecked_linear(&self, i: usize) -> &T

Retrieves a reference to the i-th element without bound-checking. Read more
source§

unsafe fn get_unchecked(&self, irow: usize, icol: usize) -> &T

Retrieves a reference to the i-th element without bound-checking. Read more
source§

impl<T, C> RawStorageMut<T, Dynamic, C> for VecStorage<T, Dynamic, C>where C: Dim,

source§

fn ptr_mut(&mut self) -> *mut T

The matrix mutable data pointer.
source§

unsafe fn as_mut_slice_unchecked(&mut self) -> &mut [T]

Retrieves the mutable data buffer as a contiguous slice. Read more
source§

fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut T

Gets the mutable address of the i-th matrix component without performing bound-checking. Read more
source§

fn get_address_unchecked_mut(&mut self, irow: usize, icol: usize) -> *mut T

Gets the mutable address of the i-th matrix component without performing bound-checking. Read more
source§

unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut T

Retrieves a mutable reference to the i-th element without bound-checking. Read more
source§

unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut T

Retrieves a mutable reference to the element at (irow, icol) without bound-checking. Read more
source§

unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)

Swaps two elements using their linear index without bound-checking. Read more
source§

unsafe fn swap_unchecked( &mut self, row_col1: (usize, usize), row_col2: (usize, usize) )

Swaps two elements without bound-checking. Read more
source§

impl<T, R> RawStorageMut<T, R, Dynamic> for VecStorage<T, R, Dynamic>where R: DimName,

source§

fn ptr_mut(&mut self) -> *mut T

The matrix mutable data pointer.
source§

unsafe fn as_mut_slice_unchecked(&mut self) -> &mut [T]

Retrieves the mutable data buffer as a contiguous slice. Read more
source§

fn get_address_unchecked_linear_mut(&mut self, i: usize) -> *mut T

Gets the mutable address of the i-th matrix component without performing bound-checking. Read more
source§

fn get_address_unchecked_mut(&mut self, irow: usize, icol: usize) -> *mut T

Gets the mutable address of the i-th matrix component without performing bound-checking. Read more
source§

unsafe fn get_unchecked_linear_mut(&mut self, i: usize) -> &mut T

Retrieves a mutable reference to the i-th element without bound-checking. Read more
source§

unsafe fn get_unchecked_mut(&mut self, irow: usize, icol: usize) -> &mut T

Retrieves a mutable reference to the element at (irow, icol) without bound-checking. Read more
source§

unsafe fn swap_unchecked_linear(&mut self, i1: usize, i2: usize)

Swaps two elements using their linear index without bound-checking. Read more
source§

unsafe fn swap_unchecked( &mut self, row_col1: (usize, usize), row_col2: (usize, usize) )

Swaps two elements without bound-checking. Read more
source§

impl<T, CTo, const RFROM: usize, const CFROM: usize> Reallocator<T, Const<RFROM>, Const<CFROM>, Dynamic, CTo> for DefaultAllocatorwhere T: Scalar, CTo: Dim,

source§

unsafe fn reallocate_copy( rto: Dynamic, cto: CTo, buf: ArrayStorage<T, RFROM, CFROM> ) -> VecStorage<MaybeUninit<T>, Dynamic, CTo>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, RTo, const RFROM: usize, const CFROM: usize> Reallocator<T, Const<RFROM>, Const<CFROM>, RTo, Dynamic> for DefaultAllocatorwhere T: Scalar, RTo: DimName,

source§

unsafe fn reallocate_copy( rto: RTo, cto: Dynamic, buf: ArrayStorage<T, RFROM, CFROM> ) -> VecStorage<MaybeUninit<T>, RTo, Dynamic>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, CFrom, CTo> Reallocator<T, Dynamic, CFrom, Dynamic, CTo> for DefaultAllocatorwhere T: Scalar, CFrom: Dim, CTo: Dim,

source§

unsafe fn reallocate_copy( rto: Dynamic, cto: CTo, buf: VecStorage<T, Dynamic, CFrom> ) -> VecStorage<MaybeUninit<T>, Dynamic, CTo>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, CFrom, RTo> Reallocator<T, Dynamic, CFrom, RTo, Dynamic> for DefaultAllocatorwhere T: Scalar, CFrom: Dim, RTo: DimName,

source§

unsafe fn reallocate_copy( rto: RTo, cto: Dynamic, buf: VecStorage<T, Dynamic, CFrom> ) -> VecStorage<MaybeUninit<T>, RTo, Dynamic>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, RFrom, CTo> Reallocator<T, RFrom, Dynamic, Dynamic, CTo> for DefaultAllocatorwhere T: Scalar, RFrom: DimName, CTo: Dim,

source§

unsafe fn reallocate_copy( rto: Dynamic, cto: CTo, buf: VecStorage<T, RFrom, Dynamic> ) -> VecStorage<MaybeUninit<T>, Dynamic, CTo>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, RFrom, RTo> Reallocator<T, RFrom, Dynamic, RTo, Dynamic> for DefaultAllocatorwhere T: Scalar, RFrom: DimName, RTo: DimName,

source§

unsafe fn reallocate_copy( rto: RTo, cto: Dynamic, buf: VecStorage<T, RFrom, Dynamic> ) -> VecStorage<MaybeUninit<T>, RTo, Dynamic>

Reallocates a buffer of shape (RTo, CTo), possibly reusing a previously allocated buffer buf. Data stored by buf are linearly copied to the output: Read more
source§

impl<T, C1, C2> ReshapableStorage<T, Dynamic, C1, Dynamic, C2> for VecStorage<T, Dynamic, C1>where T: Scalar, C1: Dim, C2: Dim,

§

type Output = VecStorage<T, Dynamic, C2>

The reshaped storage type.
source§

fn reshape_generic( self, nrows: Dynamic, ncols: C2 ) -> <VecStorage<T, Dynamic, C1> as ReshapableStorage<T, Dynamic, C1, Dynamic, C2>>::Output

Reshapes the storage into the output storage type.
source§

impl<T, C1, R2> ReshapableStorage<T, Dynamic, C1, R2, Dynamic> for VecStorage<T, Dynamic, C1>where T: Scalar, C1: Dim, R2: DimName,

§

type Output = VecStorage<T, R2, Dynamic>

The reshaped storage type.
source§

fn reshape_generic( self, nrows: R2, ncols: Dynamic ) -> <VecStorage<T, Dynamic, C1> as ReshapableStorage<T, Dynamic, C1, R2, Dynamic>>::Output

Reshapes the storage into the output storage type.
source§

impl<T, R1, C2> ReshapableStorage<T, R1, Dynamic, Dynamic, C2> for VecStorage<T, R1, Dynamic>where T: Scalar, R1: DimName, C2: Dim,

§

type Output = VecStorage<T, Dynamic, C2>

The reshaped storage type.
source§

fn reshape_generic( self, nrows: Dynamic, ncols: C2 ) -> <VecStorage<T, R1, Dynamic> as ReshapableStorage<T, R1, Dynamic, Dynamic, C2>>::Output

Reshapes the storage into the output storage type.
source§

impl<T, R1, R2> ReshapableStorage<T, R1, Dynamic, R2, Dynamic> for VecStorage<T, R1, Dynamic>where T: Scalar, R1: DimName, R2: DimName,

§

type Output = VecStorage<T, R2, Dynamic>

The reshaped storage type.
source§

fn reshape_generic( self, nrows: R2, ncols: Dynamic ) -> <VecStorage<T, R1, Dynamic> as ReshapableStorage<T, R1, Dynamic, R2, Dynamic>>::Output

Reshapes the storage into the output storage type.
source§

impl<D> SameDimension<D, Dynamic> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> SameDimension<Dynamic, D> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> SameNumberOfColumns<D, Dynamic> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> SameNumberOfColumns<Dynamic, D> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> SameNumberOfRows<D, Dynamic> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl<D> SameNumberOfRows<Dynamic, D> for ShapeConstraintwhere D: DimName,

§

type Representative = D

This is either equal to D1 or D2, always choosing the one (if any) which is a type-level constant.
source§

impl Serialize for Dynamic

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<T, C> Storage<T, Dynamic, C> for VecStorage<T, Dynamic, C>where T: Scalar, C: Dim, DefaultAllocator: Allocator<T, Dynamic, C, Buffer = VecStorage<T, Dynamic, C>>,

source§

fn into_owned(self) -> <DefaultAllocator as Allocator<T, Dynamic, C>>::Bufferwhere DefaultAllocator: Allocator<T, Dynamic, C>,

Builds a matrix data storage that does not contain any reference.
source§

fn clone_owned(&self) -> <DefaultAllocator as Allocator<T, Dynamic, C>>::Bufferwhere DefaultAllocator: Allocator<T, Dynamic, C>,

Clones this data storage to one that does not contain any reference.
source§

impl<T, R> Storage<T, R, Dynamic> for VecStorage<T, R, Dynamic>where T: Scalar, R: DimName, DefaultAllocator: Allocator<T, R, Dynamic, Buffer = VecStorage<T, R, Dynamic>>,

source§

fn into_owned(self) -> <DefaultAllocator as Allocator<T, R, Dynamic>>::Bufferwhere DefaultAllocator: Allocator<T, R, Dynamic>,

Builds a matrix data storage that does not contain any reference.
source§

fn clone_owned(&self) -> <DefaultAllocator as Allocator<T, R, Dynamic>>::Bufferwhere DefaultAllocator: Allocator<T, R, Dynamic>,

Clones this data storage to one that does not contain any reference.
source§

impl Sub<usize> for Dynamic

§

type Output = Dynamic

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Dynamic

Performs the - operation. Read more
source§

impl Copy for Dynamic

source§

impl Eq for Dynamic

source§

impl IsDynamic for Dynamic

source§

impl IsNotStaticOne for Dynamic

source§

impl StructuralEq for Dynamic

source§

impl StructuralPartialEq for Dynamic

Auto Trait Implementations§

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<D> DimAdd<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn add(self, other: Dynamic) -> Dynamic

source§

impl<D> DimDiv<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn div(self, other: Dynamic) -> Dynamic

source§

impl<D> DimMax<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn max(self, other: Dynamic) -> Dynamic

source§

impl<D> DimMin<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn min(self, other: Dynamic) -> Dynamic

source§

impl<D> DimMul<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn mul(self, other: Dynamic) -> Dynamic

source§

impl<D> DimSub<Dynamic> for Dwhere D: DimName,

§

type Output = Dynamic

source§

fn sub(self, other: Dynamic) -> Dynamic

§

impl<T> Downcast for Twhere T: Any,

§

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

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.
§

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

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

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.
§

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.
§

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

§

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

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

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<T> Finalize for T

§

unsafe fn finalize_raw(data: *mut ())

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

§

type Output = T

Should always be Self
§

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

§

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

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

fn is_in_subset(&self) -> bool

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

fn to_subset_unchecked(&self) -> SS

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

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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.
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.
source§

impl<T> UserData for Twhere T: Clone + Any + Send + Sync,

source§

fn clone_boxed(&self) -> Box<dyn UserData, Global>

Clone this trait-object.
source§

fn to_any(&self) -> Box<dyn Any + Sync + Send, Global>

Clone as its super-trait trait objects.
source§

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

Downcast to Any.
§

impl<T> Component for Twhere T: Send + Sync + 'static,

source§

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

source§

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