Struct style::data::ElementStyles
source · pub struct ElementStyles {
pub primary: Option<Arc<ComputedValues>>,
pub pseudos: EagerPseudoStyles,
}
Expand description
The styles associated with a node, including the styles for any pseudo-elements.
Fields§
§primary: Option<Arc<ComputedValues>>
The element’s style.
pseudos: EagerPseudoStyles
A list of the styles for the element’s eagerly-cascaded pseudo-elements.
Implementations§
source§impl ElementStyles
impl ElementStyles
sourcepub fn get_primary(&self) -> Option<&Arc<ComputedValues>>
pub fn get_primary(&self) -> Option<&Arc<ComputedValues>>
Returns the primary style.
sourcepub fn primary(&self) -> &Arc<ComputedValues>
pub fn primary(&self) -> &Arc<ComputedValues>
Returns the primary style. Panic if no style available.
sourcepub fn is_display_none(&self) -> bool
pub fn is_display_none(&self) -> bool
Whether this element display
value is none
.
sourcepub fn viewport_unit_usage(&self) -> ViewportUnitUsage
pub fn viewport_unit_usage(&self) -> ViewportUnitUsage
Whether this element uses viewport units.
Trait Implementations§
source§impl Clone for ElementStyles
impl Clone for ElementStyles
source§fn clone(&self) -> ElementStyles
fn clone(&self) -> ElementStyles
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 ElementStyles
impl Debug for ElementStyles
source§impl Default for ElementStyles
impl Default for ElementStyles
source§fn default() -> ElementStyles
fn default() -> ElementStyles
Returns the “default value” for a type. Read more
source§impl From<ResolvedElementStyles> for ElementStyles
impl From<ResolvedElementStyles> for ElementStyles
source§fn from(r: ResolvedElementStyles) -> ElementStyles
fn from(r: ResolvedElementStyles) -> ElementStyles
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ElementStyles
impl !RefUnwindSafe for ElementStyles
impl Send for ElementStyles
impl Sync for ElementStyles
impl Unpin for ElementStyles
impl !UnwindSafe for ElementStyles
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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