pub struct DynamicObject { /* private fields */ }
Implementations§
Source§impl DynamicObject
impl DynamicObject
pub fn get(&self, name: &str) -> Option<&Object>
pub fn get_mut(&mut self, name: &str) -> Option<&mut Object>
pub fn set(&mut self, name: impl ToString, value: Object)
pub fn delete(&mut self, name: &str) -> Option<Object>
pub fn drain(&mut self) -> impl Iterator<Item = (String, Object)> + '_
pub fn properties(&self) -> impl Iterator<Item = (&str, &Object)> + '_
pub fn properties_mut( &mut self, ) -> impl Iterator<Item = (&str, &mut Object)> + '_
pub fn property_names(&self) -> impl Iterator<Item = &str> + '_
pub fn property_values(&self) -> impl Iterator<Item = &Object> + '_
pub fn property_values_mut(&mut self) -> impl Iterator<Item = &mut Object> + '_
Trait Implementations§
Source§impl Default for DynamicObject
impl Default for DynamicObject
Source§fn default() -> DynamicObject
fn default() -> DynamicObject
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DynamicObject
impl RefUnwindSafe for DynamicObject
impl !Send for DynamicObject
impl !Sync for DynamicObject
impl Unpin for DynamicObject
impl UnwindSafe for DynamicObject
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