pub trait UntypedPoint {
    // Required methods
    fn get_raw_attribute<'point>(
        &'point self,
        attribute: &PointAttributeDefinition
    ) -> Result<&'point [u8]>;
    fn get_raw_attribute_mut<'point>(
        &'point mut self,
        attribute: &PointAttributeDefinition
    ) -> Result<&'point mut [u8]>;
    fn set_raw_attribute(
        &mut self,
        attribute: &PointAttributeDefinition,
        value_byte_slice: &[u8]
    ) -> Result<()>;
    fn get_attribute<T: PrimitiveType>(
        &self,
        attribute: &PointAttributeDefinition
    ) -> Result<T>;
    fn set_attribute<T: PrimitiveType>(
        &mut self,
        attribute: &PointAttributeDefinition,
        value: &T
    ) -> Result<()>;
    fn get_layout(&self) -> &PointLayout;
    fn get_cursor(&mut self) -> Cursor<&mut [u8]>;
    fn get_buffer(&self) -> &[u8] ;
}
Expand description

A trait to handle points that layout can’t be known to compile time.

Required Methods§

source

fn get_raw_attribute<'point>( &'point self, attribute: &PointAttributeDefinition ) -> Result<&'point [u8]>

Gets the data as byte slice for a attribute of the point.

source

fn get_raw_attribute_mut<'point>( &'point mut self, attribute: &PointAttributeDefinition ) -> Result<&'point mut [u8]>

Gets the data as mut byte slice for a attribute of the point.

source

fn set_raw_attribute( &mut self, attribute: &PointAttributeDefinition, value_byte_slice: &[u8] ) -> Result<()>

Sets the data for a attribute of the point.

source

fn get_attribute<T: PrimitiveType>( &self, attribute: &PointAttributeDefinition ) -> Result<T>

Gets the data from an attribute and converts it to an PrimitiveType.

source

fn set_attribute<T: PrimitiveType>( &mut self, attribute: &PointAttributeDefinition, value: &T ) -> Result<()>

Sets the data from an attribute with an PrimitiveType.

source

fn get_layout(&self) -> &PointLayout

Get the layout of the point.

source

fn get_cursor(&mut self) -> Cursor<&mut [u8]>

source

fn get_buffer(&self) -> &[u8]

Access the underlying memory buffer of the untyped point

Object Safety§

This trait is not object safe.

Implementors§