pub struct Shape(/* private fields */);Implementations§
source§impl Shape
impl Shape
pub fn len(&self) -> usize
pub fn reshape(&mut self, new: impl ToShape)
pub fn add_batch(self, batch_size: usize) -> Self
pub fn try_reshape(&mut self, new: impl ToShape) -> Result<()>
pub fn as_array2(&self) -> [usize; 2]
pub fn as_array3(&self) -> [usize; 3]
pub fn as_array4(&self) -> [usize; 4]
pub fn as_array5(&self) -> [usize; 5]
pub fn as_array6(&self) -> [usize; 6]
Trait Implementations§
source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
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 Ord for Shape
impl Ord for Shape
source§impl PartialEq for Shape
impl PartialEq for Shape
source§impl PartialOrd for Shape
impl PartialOrd for Shape
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Copy for Shape
impl Eq for Shape
impl StructuralEq for Shape
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnwindSafe for Shape
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Serialize for Twhere
T: Serialize + ?Sized,
impl<T> Serialize for Twhere T: Serialize + ?Sized,
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> Type for T
impl<T> Type for T
source§const METATYPE: MetaType = MetaType::Concrete
const METATYPE: MetaType = MetaType::Concrete
Enum describing whether a type is
TraitObject, Slice or Concrete.source§fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
fn dangling(_t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self with the provided Self::Meta.source§fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
fn fatten(thin: *mut (), _t: <T as Type>::Meta) -> *mut T
Create a
*mut Self with the provided Self::Meta.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject, Slice or Concrete.source§impl<T> Type for Twhere
T: ?Sized,
impl<T> Type for Twhere T: ?Sized,
source§default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
default fn dangling(t: <T as Type>::Meta) -> NonNull<T>
Create a dangling non-null
*const Self with the provided Self::Meta.source§default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
default fn fatten(thin: *mut (), t: <T as Type>::Meta) -> *mut T
Create a
*mut Self with the provided Self::Meta.source§fn meta_type(self: *const Self) -> MetaType
fn meta_type(self: *const Self) -> MetaType
Helper method describing whether a type is
TraitObject, Slice or Concrete.