pub enum SupportLevel {
Unsupported,
FallbackCopy,
Native,
}Expand description
Three-valued support level for a backend capability axis.
FallbackCopy is intentionally distinct from Native: the operation is
accepted, but only by materializing through a default/copy path.
§Examples
use tenferro_tensor::SupportLevel;
assert!(SupportLevel::Native > SupportLevel::FallbackCopy);
assert!(SupportLevel::FallbackCopy.is_supported());
assert!(!SupportLevel::Unsupported.is_supported());Variants§
Implementations§
Source§impl SupportLevel
impl SupportLevel
Sourcepub const fn is_supported(self) -> bool
pub const fn is_supported(self) -> bool
Return whether this level represents any usable implementation.
§Examples
use tenferro_tensor::SupportLevel;
assert!(SupportLevel::Native.is_supported());
assert!(!SupportLevel::Unsupported.is_supported());Trait Implementations§
Source§impl Clone for SupportLevel
impl Clone for SupportLevel
Source§fn clone(&self) -> SupportLevel
fn clone(&self) -> SupportLevel
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 SupportLevel
impl Debug for SupportLevel
Source§impl Hash for SupportLevel
impl Hash for SupportLevel
Source§impl Ord for SupportLevel
impl Ord for SupportLevel
Source§fn cmp(&self, other: &SupportLevel) -> Ordering
fn cmp(&self, other: &SupportLevel) -> Ordering
1.21.0 (const: unstable) · 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 SupportLevel
impl PartialEq for SupportLevel
Source§fn eq(&self, other: &SupportLevel) -> bool
fn eq(&self, other: &SupportLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for SupportLevel
impl PartialOrd for SupportLevel
impl Copy for SupportLevel
impl Eq for SupportLevel
impl StructuralPartialEq for SupportLevel
Auto Trait Implementations§
impl Freeze for SupportLevel
impl RefUnwindSafe for SupportLevel
impl Send for SupportLevel
impl Sync for SupportLevel
impl Unpin for SupportLevel
impl UnsafeUnpin for SupportLevel
impl UnwindSafe for SupportLevel
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