pub struct Data<E, const D: usize> {
pub value: Vec<E, Global>,
pub shape: Shape<D>,
}Fields§
§value: Vec<E, Global>§shape: Shape<D>Implementations§
source§impl<E, const D: usize> Data<E, D>where
E: Debug + Copy,
impl<E, const D: usize> Data<E, D>where E: Debug + Copy,
pub fn serialize(&self) -> DataSerialize<E>
source§impl<E, const D: usize> Data<E, D>where
E: Into<f64> + Clone + Debug + PartialEq<E>,
impl<E, const D: usize> Data<E, D>where E: Into<f64> + Clone + Debug + PartialEq<E>,
pub fn assert_approx_eq(&self, other: &Data<E, D>, precision: usize)
pub fn assert_in_range(&self, min: E, max: E)
source§impl<const D: usize> Data<usize, D>
impl<const D: usize> Data<usize, D>
pub fn from_usize<O>(self) -> Data<O, D>where O: FromPrimitive,
Trait Implementations§
source§impl<E, const D: usize> From<&DataSerialize<E>> for Data<E, D>where
E: Clone,
impl<E, const D: usize> From<&DataSerialize<E>> for Data<E, D>where E: Clone,
source§fn from(data: &DataSerialize<E>) -> Data<E, D>
fn from(data: &DataSerialize<E>) -> Data<E, D>
Converts to this type from the input type.
source§impl<E, const A: usize, const B: usize, const C: usize, const D: usize> From<[[[[E; D]; C]; B]; A]> for Data<E, 4>where
E: Debug + Copy,
impl<E, const A: usize, const B: usize, const C: usize, const D: usize> From<[[[[E; D]; C]; B]; A]> for Data<E, 4>where E: Debug + Copy,
source§impl<E, const A: usize, const B: usize, const C: usize> From<[[[E; C]; B]; A]> for Data<E, 3>where
E: Debug + Copy,
impl<E, const A: usize, const B: usize, const C: usize> From<[[[E; C]; B]; A]> for Data<E, 3>where E: Debug + Copy,
source§impl<E, const A: usize, const B: usize> From<[[E; B]; A]> for Data<E, 2>where
E: Debug + Copy,
impl<E, const A: usize, const B: usize> From<[[E; B]; A]> for Data<E, 2>where E: Debug + Copy,
source§impl<E, const D: usize> From<DataSerialize<E>> for Data<E, D>
impl<E, const D: usize> From<DataSerialize<E>> for Data<E, D>
source§fn from(data: DataSerialize<E>) -> Data<E, D>
fn from(data: DataSerialize<E>) -> Data<E, D>
Converts to this type from the input type.
source§impl<E, const D: usize> PartialEq<Data<E, D>> for Data<E, D>where
E: PartialEq<E>,
impl<E, const D: usize> PartialEq<Data<E, D>> for Data<E, D>where E: PartialEq<E>,
impl<E, const D: usize> Eq for Data<E, D>where E: Eq,
impl<E, const D: usize> StructuralEq for Data<E, D>
impl<E, const D: usize> StructuralPartialEq for Data<E, D>
Auto Trait Implementations§
impl<E, const D: usize> RefUnwindSafe for Data<E, D>where E: RefUnwindSafe,
impl<E, const D: usize> Send for Data<E, D>where E: Send,
impl<E, const D: usize> Sync for Data<E, D>where E: Sync,
impl<E, const D: usize> Unpin for Data<E, D>where E: Unpin,
impl<E, const D: usize> UnwindSafe for Data<E, D>where E: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more