pub struct NewEntity {
pub type_id: Option<TypeId>,
pub layer: Option<LayerId>,
pub geometry: Option<Shape>,
pub props: BTreeMap<String, PropValue>,
pub transform: Option<Affine>,
pub name: Option<String>,
pub style: Option<Style>,
pub data: BTreeMap<String, Value>,
}Expand description
Data for a new entity.
Fields§
§type_id: Option<TypeId>Type.
layer: Option<LayerId>Layer (default: first unlocked visible layer).
geometry: Option<Shape>Geometry (built-in types).
props: BTreeMap<String, PropValue>Properties (missing ones get defaults).
transform: Option<Affine>Transform.
name: Option<String>Name.
style: Option<Style>Style.
data: BTreeMap<String, Value>Opaque payloads.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NewEntity
impl<'de> Deserialize<'de> for NewEntity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for NewEntity
Auto Trait Implementations§
impl Freeze for NewEntity
impl RefUnwindSafe for NewEntity
impl Send for NewEntity
impl Sync for NewEntity
impl Unpin for NewEntity
impl UnsafeUnpin for NewEntity
impl UnwindSafe for NewEntity
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> Scalar for T
§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.