Function pasture_core::layout::conversion::get_converter_for_attributes[][src]

pub fn get_converter_for_attributes(
    from_attribute: &PointAttributeDefinition,
    to_attribute: &PointAttributeDefinition
) -> Option<AttributeConversionFn>

Returns a conversion function for converting from from_attribute into to_attribute. Both attributes must have the same name but can have different datatypes. Conversion functions operate on raw byte buffers, where the first argument is a buffer that represents a single value of from_attribute and the second buffer is a single mutable value of to_attribute. If both attributes are equal, None is returned.

Panics

If no conversion from from_attribute into to_attribute is possible