pub trait Constructable: Sized + ShapeStrideTrait {
// Required methods
fn from_data(vec: Vec<f32>) -> Self;
fn from_data_and_shape(vec: Vec<f32>, shape: Vec<usize>);
fn zeros<'async_trait>(
shape: Vec<usize>,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait;
fn rand<'async_trait>(
shape: Vec<usize>,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait;
fn clone_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn zeros_like<'life0, 'async_trait>(
other: &'life0 Self,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Required Methods§
fn from_data(vec: Vec<f32>) -> Self
fn from_data_and_shape(vec: Vec<f32>, shape: Vec<usize>)
fn zeros<'async_trait>(
shape: Vec<usize>,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>where
Self: 'async_trait,
fn rand<'async_trait>(
shape: Vec<usize>,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>where
Self: 'async_trait,
fn clone_async<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn zeros_like<'life0, 'async_trait>(
other: &'life0 Self,
) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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.