Trait sucds::int_vectors::Build

source ·
pub trait Build {
    // Required method
    fn build_from_slice<T>(vals: &[T]) -> Result<Self>
       where T: ToPrimitive,
             Self: Sized;
}
Expand description

Interface for building integer vectors.

Required Methods§

source

fn build_from_slice<T>(vals: &[T]) -> Result<Self>where T: ToPrimitive, Self: Sized,

Creates a new vector from a slice of integers vals.

Arguments
  • vals: Slice of integers to be stored.
Errors

An error is returned if vals contains an integer that cannot be cast to usize.

Implementors§