Struct burn_tensor::DataSerialize
source · Fields§
§value: Vec<P>§shape: Vec<usize>Implementations§
source§impl<P: Element> DataSerialize<P>
impl<P: Element> DataSerialize<P>
pub fn convert<E: Element>(self) -> DataSerialize<E>
Trait Implementations§
source§impl<P: Clone> Clone for DataSerialize<P>
impl<P: Clone> Clone for DataSerialize<P>
source§fn clone(&self) -> DataSerialize<P>
fn clone(&self) -> DataSerialize<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<P: Debug> Debug for DataSerialize<P>
impl<P: Debug> Debug for DataSerialize<P>
source§impl<'de, P> Deserialize<'de> for DataSerialize<P>where
P: Deserialize<'de>,
impl<'de, P> Deserialize<'de> for DataSerialize<P>where
P: Deserialize<'de>,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<P: Clone, const D: usize> From<&DataSerialize<P>> for Data<P, D>
impl<P: Clone, const D: usize> From<&DataSerialize<P>> for Data<P, D>
source§fn from(data: &DataSerialize<P>) -> Self
fn from(data: &DataSerialize<P>) -> Self
Converts to this type from the input type.
source§impl<P, const D: usize> From<DataSerialize<P>> for Data<P, D>
impl<P, const D: usize> From<DataSerialize<P>> for Data<P, D>
source§fn from(data: DataSerialize<P>) -> Self
fn from(data: DataSerialize<P>) -> Self
Converts to this type from the input type.
source§impl<P: PartialEq> PartialEq<DataSerialize<P>> for DataSerialize<P>
impl<P: PartialEq> PartialEq<DataSerialize<P>> for DataSerialize<P>
source§fn eq(&self, other: &DataSerialize<P>) -> bool
fn eq(&self, other: &DataSerialize<P>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<P> Serialize for DataSerialize<P>where
P: Serialize,
impl<P> Serialize for DataSerialize<P>where
P: Serialize,
impl<P: Eq> Eq for DataSerialize<P>
impl<P> StructuralEq for DataSerialize<P>
impl<P> StructuralPartialEq for DataSerialize<P>
Auto Trait Implementations§
impl<P> RefUnwindSafe for DataSerialize<P>where
P: RefUnwindSafe,
impl<P> Send for DataSerialize<P>where
P: Send,
impl<P> Sync for DataSerialize<P>where
P: Sync,
impl<P> Unpin for DataSerialize<P>where
P: Unpin,
impl<P> UnwindSafe for DataSerialize<P>where
P: UnwindSafe,
Blanket Implementations§
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
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
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.