Enum plexus::encoding::ply::PropertyType
[−]pub enum PropertyType {
Scalar(ScalarType),
List(ScalarType, ScalarType),
}
Expand description
Data type used to encode properties in the payload.
There are two possible types: scalars and lists. Lists are a sequence of scalars with a leading integer value defining how many elements the list contains.
Variants
Scalar(ScalarType)
Simple, “one-number” type.
List(ScalarType, ScalarType)
Defines a sequence of scalars with the same type.
First value is the index type which should be an integer variant,
Encoded in ascii, you always get the same number in the file (for example 32
or 17
).
Hence, a good choice is mainly important for internal representation and binary encoding. T
he possible trade-off should be obvious:
List length/flexibility against storage size. Though this obviously depends on your specific use case.
Second value is the type of the list elemetns.
Trait Implementations
impl Clone for PropertyType
impl Clone for PropertyType
fn clone(&self) -> PropertyType
fn clone(&self) -> PropertyType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for PropertyType
impl Debug for PropertyType
impl PartialEq<PropertyType> for PropertyType
impl PartialEq<PropertyType> for PropertyType
fn eq(&self, other: &PropertyType) -> bool
fn eq(&self, other: &PropertyType) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
fn ne(&self, other: &PropertyType) -> bool
fn ne(&self, other: &PropertyType) -> bool
This method tests for !=
.
impl Eq for PropertyType
impl StructuralEq for PropertyType
impl StructuralPartialEq for PropertyType
Auto Trait Implementations
impl RefUnwindSafe for PropertyType
impl Send for PropertyType
impl Sync for PropertyType
impl Unpin for PropertyType
impl UnwindSafe for PropertyType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FromGeometry<T> for T
impl<T> FromGeometry<T> for T
fn from_geometry(other: T) -> T
sourceimpl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
impl<T, U> IntoGeometry<U> for T where
U: FromGeometry<T>,
fn into_geometry(self) -> U
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
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.