pub struct ValueDescriptor { /* private fields */ }Expand description
Portable shape and element type for a backend-owned received value.
Implementations§
Source§impl ValueDescriptor
impl ValueDescriptor
Sourcepub fn new(shape: Vec<usize>, dtype: TensorDtype) -> Result<Self, BackendError>
pub fn new(shape: Vec<usize>, dtype: TensorDtype) -> Result<Self, BackendError>
Validates a portable value shape and element type.
Sourcepub const fn dtype(&self) -> &TensorDtype
pub const fn dtype(&self) -> &TensorDtype
Returns the logical element type.
Trait Implementations§
Source§impl Clone for ValueDescriptor
impl Clone for ValueDescriptor
Source§fn clone(&self) -> ValueDescriptor
fn clone(&self) -> ValueDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValueDescriptor
impl Debug for ValueDescriptor
Source§impl<'de> Deserialize<'de> for ValueDescriptor
impl<'de> Deserialize<'de> for ValueDescriptor
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
impl Eq for ValueDescriptor
Source§impl PartialEq for ValueDescriptor
impl PartialEq for ValueDescriptor
Source§impl Serialize for ValueDescriptor
impl Serialize for ValueDescriptor
impl StructuralPartialEq for ValueDescriptor
Auto Trait Implementations§
impl Freeze for ValueDescriptor
impl RefUnwindSafe for ValueDescriptor
impl Send for ValueDescriptor
impl Sync for ValueDescriptor
impl Unpin for ValueDescriptor
impl UnsafeUnpin for ValueDescriptor
impl UnwindSafe for ValueDescriptor
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