[][src]Trait pointcloud::datasources::DataSource

pub trait DataSource: Send + Sync + Debug {
    fn get(&self, i: usize) -> Result<&[f32], PointCloudError>;
fn dim(&self) -> usize;
fn len(&self) -> usize;
fn name(&self) -> String; }

The trait for uniform access across many data types

Required methods

fn get(&self, i: usize) -> Result<&[f32], PointCloudError>

Make this panic with DataAccessError when implementing,

fn dim(&self) -> usize

The dimension that this dimensioned data respects

fn len(&self) -> usize

This should always be the number of points contained in this portion of the dataset.

fn name(&self) -> String

The name of this portion of the dataset. Useful for reporting errors to the user.

Loading content...

Implementors

Loading content...