Struct pasture_core::containers::UntypedPointSlice
source · pub struct UntypedPointSlice<'point> { /* private fields */ }
Expand description
An implementaion of UntypedPoint
trait that handles an external buffer.
Implementations§
source§impl<'point> UntypedPointSlice<'point>
impl<'point> UntypedPointSlice<'point>
pub fn new(layout: &'point PointLayout, slice: &'point mut [u8]) -> Self
Trait Implementations§
source§impl UntypedPoint for UntypedPointSlice<'_>
impl UntypedPoint for UntypedPointSlice<'_>
source§fn get_attribute<T: PrimitiveType>(
&self,
attribute: &PointAttributeDefinition
) -> Result<T>
fn get_attribute<T: PrimitiveType>( &self, attribute: &PointAttributeDefinition ) -> Result<T>
Gets the data from an attribute and converts it to an
PrimitiveType
.source§fn get_raw_attribute<'point>(
&'point self,
attribute: &PointAttributeDefinition
) -> Result<&'point [u8]>
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]>
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: &[u8]
) -> Result<()>
fn set_raw_attribute( &mut self, attribute: &PointAttributeDefinition, value: &[u8] ) -> Result<()>
Sets the data for a attribute of the point.
source§fn get_layout(&self) -> &PointLayout
fn get_layout(&self) -> &PointLayout
Get the layout of the point.
fn get_cursor(&mut self) -> Cursor<&mut [u8]>
source§fn get_buffer(&self) -> &[u8] ⓘ
fn get_buffer(&self) -> &[u8] ⓘ
Access the underlying memory buffer of the untyped point
source§fn set_attribute<T: PrimitiveType>(
&mut self,
attribute: &PointAttributeDefinition,
value: &T
) -> Result<()>
fn set_attribute<T: PrimitiveType>( &mut self, attribute: &PointAttributeDefinition, value: &T ) -> Result<()>
Sets the data from an attribute with an
PrimitiveType
.Auto Trait Implementations§
impl<'point> RefUnwindSafe for UntypedPointSlice<'point>
impl<'point> Send for UntypedPointSlice<'point>
impl<'point> Sync for UntypedPointSlice<'point>
impl<'point> Unpin for UntypedPointSlice<'point>
impl<'point> !UnwindSafe for UntypedPointSlice<'point>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.