pub struct PropertyDef {
pub name: String,
pub data_type: PropertyType,
}
Expand description
Defines a property of an element.
Fields§
§name: String
Unique name of property.
The name should be unique for each property of the same element.
data_type: PropertyType
Data type of the property: You can have simple scalars (ints, floats, etc.) or lists of scalars. In the case of lists you need to decide in which type you want to store the list length and what type to use for the list elemetns.
Implementations§
Source§impl PropertyDef
impl PropertyDef
Sourcepub fn new(name: String, data_type: PropertyType) -> Self
pub fn new(name: String, data_type: PropertyType) -> Self
Creates a new property definition.
Trait Implementations§
Source§impl Clone for PropertyDef
impl Clone for PropertyDef
Source§fn clone(&self) -> PropertyDef
fn clone(&self) -> PropertyDef
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PropertyDef
impl Debug for PropertyDef
Source§impl Key for PropertyDef
impl Key for PropertyDef
Source§impl PartialEq for PropertyDef
impl PartialEq for PropertyDef
impl Eq for PropertyDef
impl StructuralPartialEq for PropertyDef
Auto Trait Implementations§
impl Freeze for PropertyDef
impl RefUnwindSafe for PropertyDef
impl Send for PropertyDef
impl Sync for PropertyDef
impl Unpin for PropertyDef
impl UnwindSafe for PropertyDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)