ella_tensor

Trait MaskedValue

Source
pub trait MaskedValue: TensorValue {
    // Required methods
    fn to_option(self) -> Option<Self::Unmasked>;
    fn from_option(value: Option<Self::Unmasked>) -> Self;
}
Expand description

Trait that allows casting between TensorValue::Masked and Option<TensorValue>

Required Methods§

Source

fn to_option(self) -> Option<Self::Unmasked>

Source

fn from_option(value: Option<Self::Unmasked>) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> MaskedValue for Option<T>
where T: TensorValue<Masked = Option<T>, Unmasked = T>,

Implementors§