Struct pasture_core::layout::PointAttributeMember
source ·
[−]pub struct PointAttributeMember { /* private fields */ }Expand description
A point attribute within a PointType structure. This is similar to a PointAttributeDefinition, but includes the
offset of the member within the structure
Implementations
Creates a new custom PointAttributeMember with the given name, datatype and byte offset
let custom_attribute = PointAttributeMember::custom("Custom", PointAttributeDataType::F32, 8);Returns the name of the associated PointAttributeMember
let custom_attribute = PointAttributeMember::custom("Custom", PointAttributeDataType::F32, 8);
let name = custom_attribute.name();Returns the datatype of the associated PointAttributeMember
let custom_attribute = PointAttributeMember::custom("Custom", PointAttributeDataType::F32, 0);
let datatype = custom_attribute.datatype();Returns the byte offset of the associated PointAttributeMember
let custom_attribute = PointAttributeMember::custom("Custom", PointAttributeDataType::F32, 8);
let offset = custom_attribute.offset();Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for PointAttributeMember
impl Send for PointAttributeMember
impl Sync for PointAttributeMember
impl Unpin for PointAttributeMember
impl UnwindSafe for PointAttributeMember
Blanket Implementations
Mutably borrows from an owned value. Read more
The inverse inclusion map: attempts to construct self from the equivalent element of its
superset. Read more
pub fn is_in_subset(&self) -> bool
pub fn is_in_subset(&self) -> bool
Checks if self is actually part of its subset T (and can be converted to it).
pub fn to_subset_unchecked(&self) -> SS
pub fn to_subset_unchecked(&self) -> SS
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
pub fn from_subset(element: &SS) -> SP
pub fn from_subset(element: &SS) -> SP
The inclusion map: converts self to the equivalent element of its superset.
