pub trait PointReader {
    // Required methods
    fn read_into<'a, 'b, B: BorrowedMutBuffer<'a>>(
        &mut self,
        point_buffer: &'b mut B,
        count: usize
    ) -> Result<usize>
       where 'a: 'b;
    fn get_metadata(&self) -> &dyn Metadata;
    fn get_default_point_layout(&self) -> &PointLayout;

    // Provided method
    fn read<'a, B: OwningBuffer<'a> + MakeBufferFromLayout<'a> + 'a>(
        &mut self,
        count: usize
    ) -> Result<B> { ... }
}
Expand description

Base trait for all types that support reading point data

Required Methods§

source

fn read_into<'a, 'b, B: BorrowedMutBuffer<'a>>( &mut self, point_buffer: &'b mut B, count: usize ) -> Result<usize>
where 'a: 'b,

Read count points from this PointReader into the given point_buffer. Uses the PointLayout of the given PointBuffer for reading. If no conversion from the default PointLayout to this new layout are possible, an error is returned. On success, returns the number of points that were read. Overwrites existing data in point_buffer starting at the first point, so the length of point_buffer must be greater than or equal to count

source

fn get_metadata(&self) -> &dyn Metadata

Returns the Metadata of the associated PointReader

source

fn get_default_point_layout(&self) -> &PointLayout

Returns the default PointLayout of the associated PointReader

Provided Methods§

source

fn read<'a, B: OwningBuffer<'a> + MakeBufferFromLayout<'a> + 'a>( &mut self, count: usize ) -> Result<B>

Reads at most count points from this PointReader into a new buffer of type B. The PointLayout this new buffer will be equal to self.get_default_point_layout

Object Safety§

This trait is not object safe.

Implementors§