#[repr(u8)]pub enum TensorKind {
Normal = 0,
Variable = 1,
}
Variants§
Implementations§
Source§impl TensorKind
impl TensorKind
Sourcepub const fn is_normal(&self) -> bool
pub const fn is_normal(&self) -> bool
Returns true if the enum is TensorKind::Normal otherwise false
Sourcepub const fn is_variable(&self) -> bool
pub const fn is_variable(&self) -> bool
Returns true if the enum is TensorKind::Variable otherwise false
Source§impl TensorKind
impl TensorKind
pub fn normal() -> TensorKind
pub fn variable() -> TensorKind
Trait Implementations§
Source§impl Clone for TensorKind
impl Clone for TensorKind
Source§fn clone(&self) -> TensorKind
fn clone(&self) -> TensorKind
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 Debug for TensorKind
impl Debug for TensorKind
Source§impl Default for TensorKind
impl Default for TensorKind
Source§fn default() -> TensorKind
fn default() -> TensorKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TensorKind
impl<'de> Deserialize<'de> for TensorKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TensorKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TensorKind
impl Display for TensorKind
Source§impl From<TensorKind> for usize
impl From<TensorKind> for usize
Source§fn from(mode: TensorKind) -> usize
fn from(mode: TensorKind) -> usize
Converts to this type from the input type.
Source§impl From<bool> for TensorKind
impl From<bool> for TensorKind
Source§fn from(is_variable: bool) -> TensorKind
fn from(is_variable: bool) -> TensorKind
Converts to this type from the input type.
Source§impl From<usize> for TensorKind
impl From<usize> for TensorKind
Source§fn from(mode: usize) -> TensorKind
fn from(mode: usize) -> TensorKind
Converts to this type from the input type.
Source§impl FromStr for TensorKind
impl FromStr for TensorKind
Source§type Err = ParseError
type Err = ParseError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<TensorKind, <TensorKind as FromStr>::Err>
fn from_str(s: &str) -> Result<TensorKind, <TensorKind as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moreSource§impl Hash for TensorKind
impl Hash for TensorKind
Source§impl IntoEnumIterator for TensorKind
impl IntoEnumIterator for TensorKind
type Iterator = TensorKindIter
fn iter() -> TensorKindIter ⓘ
Source§impl Ord for TensorKind
impl Ord for TensorKind
Source§fn cmp(&self, other: &TensorKind) -> Ordering
fn cmp(&self, other: &TensorKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TensorKind
impl PartialEq for TensorKind
Source§impl PartialOrd for TensorKind
impl PartialOrd for TensorKind
Source§impl Serialize for TensorKind
impl Serialize for TensorKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl TryFrom<&str> for TensorKind
impl TryFrom<&str> for TensorKind
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§fn try_from(s: &str) -> Result<TensorKind, <TensorKind as TryFrom<&str>>::Error>
fn try_from(s: &str) -> Result<TensorKind, <TensorKind as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl VariantNames for TensorKind
impl VariantNames for TensorKind
impl Copy for TensorKind
impl Eq for TensorKind
impl StructuralPartialEq for TensorKind
Auto Trait Implementations§
impl Freeze for TensorKind
impl RefUnwindSafe for TensorKind
impl Send for TensorKind
impl Sync for TensorKind
impl Unpin for TensorKind
impl UnwindSafe for TensorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.