Struct style::custom_properties::ComputedCustomProperties
source · #[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: CustomPropertiesMap
Map for custom properties with inherit flag set, including non-registered ones.
non_inherited: CustomPropertiesMap
Map 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.
sourcefn insert(
&mut self,
registration: &PropertyRegistrationData,
name: &Name,
value: ComputedRegisteredValue,
)
fn insert( &mut self, registration: &PropertyRegistrationData, 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.
sourcefn remove(&mut self, registration: &PropertyRegistrationData, name: &Name)
fn remove(&mut self, registration: &PropertyRegistrationData, name: &Name)
Remove a custom property from the corresponding inherited/non_inherited map, depending on whether the inherit flag is set or unset.
sourcefn shrink_to_fit(&mut self)
fn shrink_to_fit(&mut self)
Shrink the capacity of the inherited maps as much as possible.
fn map_mut( &mut self, registration: &PropertyRegistrationData, ) -> &mut CustomPropertiesMap
sourcepub fn get(
&self,
registration: &PropertyRegistrationData,
name: &Name,
) -> Option<&ComputedRegisteredValue>
pub fn get( &self, registration: &PropertyRegistrationData, name: &Name, ) -> Option<&ComputedRegisteredValue>
Returns the relevant custom property value given a registration.
Trait Implementations§
source§impl Clone for ComputedCustomProperties
impl Clone for ComputedCustomProperties
source§fn clone(&self) -> ComputedCustomProperties
fn clone(&self) -> ComputedCustomProperties
Returns a copy of the value. Read more
1.0.0 · 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 ComputedCustomProperties
impl Debug for ComputedCustomProperties
source§impl Default for ComputedCustomProperties
impl Default for ComputedCustomProperties
source§fn default() -> ComputedCustomProperties
fn default() -> ComputedCustomProperties
Returns the “default value” for a type. Read more
source§impl PartialEq for ComputedCustomProperties
impl PartialEq for ComputedCustomProperties
source§fn eq(&self, other: &ComputedCustomProperties) -> bool
fn eq(&self, other: &ComputedCustomProperties) -> bool
This method tests for
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 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert