pub struct ObjectInstance {
pub class_name: String,
pub properties: HashMap<String, Value>,
pub dynamic_properties: Option<Box<HashMap<String, DynamicPropertyDef>>>,
}Fields§
§class_name: String§properties: HashMap<String, Value>§dynamic_properties: Option<Box<HashMap<String, DynamicPropertyDef>>>Implementations§
Source§impl ObjectInstance
impl ObjectInstance
pub fn new(class_name: String) -> Self
pub fn is_class(&self, name: &str) -> bool
pub fn dynamic_property(&self, name: &str) -> Option<&DynamicPropertyDef>
pub fn dynamic_property_mut( &mut self, name: &str, ) -> Option<&mut DynamicPropertyDef>
pub fn has_dynamic_property(&self, name: &str) -> bool
pub fn insert_dynamic_property( &mut self, name: String, property: DynamicPropertyDef, ) -> Option<DynamicPropertyDef>
pub fn remove_dynamic_property( &mut self, name: &str, ) -> Option<DynamicPropertyDef>
pub fn dynamic_property_names(&self) -> Vec<String>
Trait Implementations§
Source§impl Clone for ObjectInstance
impl Clone for ObjectInstance
Source§fn clone(&self) -> ObjectInstance
fn clone(&self) -> ObjectInstance
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ObjectInstance
impl Debug for ObjectInstance
Source§impl PartialEq for ObjectInstance
impl PartialEq for ObjectInstance
impl StructuralPartialEq for ObjectInstance
Auto Trait Implementations§
impl !Send for ObjectInstance
impl !Sync for ObjectInstance
impl Freeze for ObjectInstance
impl RefUnwindSafe for ObjectInstance
impl Unpin for ObjectInstance
impl UnsafeUnpin for ObjectInstance
impl UnwindSafe for ObjectInstance
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