Skip to main content

GetMetaData

Trait GetMetaData 

Source
pub trait GetMetaData<T, N, D>
where T: RealNumber, N: NumberSpace, D: Domain,
{ // Required method fn get_meta_data(&self) -> TypeMetaData<T, N, D>; }
Expand description

Gets the meta data of a type. This can be used to create a new type with the same meta data.

§Example

use basic_dsp_vector::*;
let vector = vec!(1.0, 2.0, 3.0, 4.0, 5.0, 6.0).to_real_time_vec();
let meta_data = vector.get_meta_data();
let slice = &vector[0..2];
let slice = slice.to_dsp_vec(&meta_data);
assert_eq!(false, slice.is_complex());

Required Methods§

Source

fn get_meta_data(&self) -> TypeMetaData<T, N, D>

Gets a copy of the vector meta data. This can be used to create new types with the same meta data.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, T, N, D> GetMetaData<T, N, D> for DspVec<S, T, N, D>
where S: ToSlice<T>, T: RealNumber, N: NumberSpace, D: Domain,

Source§

impl<V, S, T, N, D> GetMetaData<T, N, D> for Matrix2xN<V, S, T>
where T: RealNumber, S: ToSlice<T>, V: Vector<T> + GetMetaData<T, N, D>, N: NumberSpace, D: Domain,

Source§

impl<V, S, T, N, D> GetMetaData<T, N, D> for Matrix3xN<V, S, T>
where T: RealNumber, S: ToSlice<T>, V: Vector<T> + GetMetaData<T, N, D>, N: NumberSpace, D: Domain,

Source§

impl<V, S, T, N, D> GetMetaData<T, N, D> for Matrix4xN<V, S, T>
where T: RealNumber, S: ToSlice<T>, V: Vector<T> + GetMetaData<T, N, D>, N: NumberSpace, D: Domain,

Source§

impl<V, S, T, N, D> GetMetaData<T, N, D> for MatrixMxN<V, S, T>
where T: RealNumber, S: ToSlice<T>, V: Vector<T> + GetMetaData<T, N, D>, N: NumberSpace, D: Domain,