pub struct PropertySets { /* private fields */ }Expand description
All property sets on an element, keyed by set name (Pset_WallCommon, and so on).
Implementations§
Source§impl PropertySets
impl PropertySets
pub fn new() -> Self
pub fn get(&self, set: &str, name: &str) -> Option<&PropertyValue>
Sourcepub fn set(
&mut self,
set: &str,
name: &str,
value: Option<PropertyValue>,
) -> Option<PropertyValue>
pub fn set( &mut self, set: &str, name: &str, value: Option<PropertyValue>, ) -> Option<PropertyValue>
Set or clear a property. None removes it, and removes the set once it is empty so
that set-then-unset leaves no trace — which is what makes command inversion exact.
Returns the previous value, which is what the inverse command is built from.
pub fn set_names(&self) -> impl Iterator<Item = &str>
pub fn iter(&self) -> impl Iterator<Item = (&str, &PropertySet)>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
Trait Implementations§
Source§impl Clone for PropertySets
impl Clone for PropertySets
Source§fn clone(&self) -> PropertySets
fn clone(&self) -> PropertySets
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 PropertySets
impl Debug for PropertySets
Source§impl Default for PropertySets
impl Default for PropertySets
Source§fn default() -> PropertySets
fn default() -> PropertySets
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PropertySets
impl<'de> Deserialize<'de> for PropertySets
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
Source§impl PartialEq for PropertySets
impl PartialEq for PropertySets
Source§fn eq(&self, other: &PropertySets) -> bool
fn eq(&self, other: &PropertySets) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PropertySets
impl Serialize for PropertySets
impl StructuralPartialEq for PropertySets
Auto Trait Implementations§
impl Freeze for PropertySets
impl RefUnwindSafe for PropertySets
impl Send for PropertySets
impl Sync for PropertySets
impl Unpin for PropertySets
impl UnsafeUnpin for PropertySets
impl UnwindSafe for PropertySets
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