#[repr(C)]pub struct ComputedCustomProperties {
pub inherited: CustomPropertiesMap,
pub non_inherited: CustomPropertiesMap,
}Expand description
A pair of separate CustomPropertiesMaps, split between custom properties that have the inherit flag set and those with the flag unset.
Fields§
§inherited: CustomPropertiesMapMap for custom properties with inherit flag set, including non-registered ones.
non_inherited: CustomPropertiesMapMap for custom properties with inherit flag unset.
Implementations§
Source§impl ComputedCustomProperties
impl ComputedCustomProperties
Sourcepub fn property_at(
&self,
index: usize,
) -> Option<(&Name, &Option<ComputedRegisteredValue>)>
pub fn property_at( &self, index: usize, ) -> Option<(&Name, &Option<ComputedRegisteredValue>)>
Return the name and value of the property at specified index, if any.
Sourcepub fn insert(
&mut self,
registration: &PropertyDescriptors,
name: &Name,
value: ComputedRegisteredValue,
)
pub fn insert( &mut self, registration: &PropertyDescriptors, name: &Name, value: ComputedRegisteredValue, )
Insert a custom property in the corresponding inherited/non_inherited map, depending on whether the inherit flag is set or unset.
Sourcepub fn remove(&mut self, registration: &PropertyDescriptors, name: &Name)
pub fn remove(&mut self, registration: &PropertyDescriptors, name: &Name)
Remove a custom property from the corresponding inherited/non_inherited map, depending on whether the inherit flag is set or unset.
Sourcepub fn shrink_to_fit(&mut self)
pub fn shrink_to_fit(&mut self)
Shrink the capacity of the inherited maps as much as possible.
fn map_mut( &mut self, registration: &PropertyDescriptors, ) -> &mut CustomPropertiesMap
Sourcepub fn get(
&self,
registration: &PropertyDescriptors,
name: &Name,
) -> Option<&ComputedRegisteredValue>
pub fn get( &self, registration: &PropertyDescriptors, name: &Name, ) -> Option<&ComputedRegisteredValue>
Returns the relevant custom property value given a registration.
Sourcepub fn get_for_cssom(&self, name: &Name) -> Option<&ComputedRegisteredValue>
pub fn get_for_cssom(&self, name: &Name) -> Option<&ComputedRegisteredValue>
Returns a property just by the name. Slightly less efficient than get(), if you already have a custom registration handy, thus the longer name.
Trait Implementations§
Source§impl Clone for ComputedCustomProperties
impl Clone for ComputedCustomProperties
Source§fn clone(&self) -> ComputedCustomProperties
fn clone(&self) -> ComputedCustomProperties
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputedCustomProperties
impl Debug for ComputedCustomProperties
Source§impl Default for ComputedCustomProperties
impl Default for ComputedCustomProperties
Source§fn default() -> ComputedCustomProperties
fn default() -> ComputedCustomProperties
Source§impl PartialEq for ComputedCustomProperties
impl PartialEq for ComputedCustomProperties
Source§fn eq(&self, other: &ComputedCustomProperties) -> bool
fn eq(&self, other: &ComputedCustomProperties) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ComputedCustomProperties
Auto Trait Implementations§
impl Freeze for ComputedCustomProperties
impl RefUnwindSafe for ComputedCustomProperties
impl Send for ComputedCustomProperties
impl Sync for ComputedCustomProperties
impl Unpin for ComputedCustomProperties
impl UnsafeUnpin for ComputedCustomProperties
impl UnwindSafe for ComputedCustomProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more