Trait Constructable

Source
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§

Source

fn from_data(vec: Vec<f32>) -> Self

Source

fn from_data_and_shape(vec: Vec<f32>, shape: Vec<usize>)

Source

fn zeros<'async_trait>( shape: Vec<usize>, ) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait,

Source

fn rand<'async_trait>( shape: Vec<usize>, ) -> Pin<Box<dyn Future<Output = Self> + 'async_trait>>
where Self: 'async_trait,

Source

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§

Source

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.

Implementors§