Trait Convertable

Source
pub trait Convertable {
    type OutType: HasAfEnum;

    // Required method
    fn convert(&self) -> Array<Self::OutType>;
}
Expand description

Type Trait to convert to an Array

Generic functions that overload the binary operations such as add, div, mul, rem, ge etc. are bound by this trait to allow combinations of scalar values and Array objects as parameters to those functions.

Internally, Convertable trait is implemented by following types.

  • f32
  • f64
  • num::Complex<f32>
  • num::Complex<f64>
  • bool
  • i32
  • u32
  • u8
  • i64
  • u64
  • i16
  • u16

Required Associated Types§

Source

type OutType: HasAfEnum

This type alias always points to Self which is the type of Array returned by the trait method convert.

Required Methods§

Source

fn convert(&self) -> Array<Self::OutType>

Get an Array of implementors type

Implementors§

Source§

impl<T> Convertable for T
where T: Clone + ConstGenerator<OutType = T>,

Source§

impl<T: HasAfEnum> Convertable for Array<T>