#[non_exhaustive]pub enum IndexElementKind {
I32,
I64,
}Expand description
Runtime tag for an IndexElement. i32 is the legacy default;
i64 was added in Phase 11.5 to match PyTorch’s int64 index
convention without an extra cast pass.
#[non_exhaustive] — additional index dtypes (u32 follows the
IndexOutputElement precedent) may land in future phases. Match
arms must include a _ => catch-all.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for IndexElementKind
impl Clone for IndexElementKind
Source§fn clone(&self) -> IndexElementKind
fn clone(&self) -> IndexElementKind
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 moreimpl Copy for IndexElementKind
Source§impl Debug for IndexElementKind
impl Debug for IndexElementKind
impl Eq for IndexElementKind
Source§impl Hash for IndexElementKind
impl Hash for IndexElementKind
Source§impl PartialEq for IndexElementKind
impl PartialEq for IndexElementKind
Source§fn eq(&self, other: &IndexElementKind) -> bool
fn eq(&self, other: &IndexElementKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for IndexElementKind
Auto Trait Implementations§
impl Freeze for IndexElementKind
impl RefUnwindSafe for IndexElementKind
impl Send for IndexElementKind
impl Sync for IndexElementKind
impl Unpin for IndexElementKind
impl UnsafeUnpin for IndexElementKind
impl UnwindSafe for IndexElementKind
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