Enum style::properties::PropertyDeclarationId
source · pub enum PropertyDeclarationId<'a> {
Longhand(LonghandId),
Custom(&'a Name),
}
Expand description
An identifier for a given property declaration, which can be either a longhand or a custom property.
Variants§
Implementations§
source§impl<'a> PropertyDeclarationId<'a>
impl<'a> PropertyDeclarationId<'a>
sourcepub fn flags(&self) -> PropertyFlags
pub fn flags(&self) -> PropertyFlags
Returns PropertyFlags for given property.
sourcepub fn to_owned(&self) -> OwnedPropertyDeclarationId
pub fn to_owned(&self) -> OwnedPropertyDeclarationId
Convert to an OwnedPropertyDeclarationId.
sourcepub fn is_or_is_longhand_of(&self, other: &PropertyId) -> bool
pub fn is_or_is_longhand_of(&self, other: &PropertyId) -> bool
Whether a given declaration id is either the same as other
, or a
longhand of it.
sourcepub fn is_longhand_of(&self, shorthand: ShorthandId) -> bool
pub fn is_longhand_of(&self, shorthand: ShorthandId) -> bool
Whether a given declaration id is a longhand belonging to this shorthand.
sourcepub fn as_longhand(&self) -> Option<LonghandId>
pub fn as_longhand(&self) -> Option<LonghandId>
Returns longhand id if it is, None otherwise.
sourcepub fn is_logical(&self) -> bool
pub fn is_logical(&self) -> bool
Return whether this property is logical.
sourcepub fn to_physical(&self, wm: WritingMode) -> Self
pub fn to_physical(&self, wm: WritingMode) -> Self
If this is a logical property, return the corresponding physical one in the given writing mode.
Otherwise, return unchanged.
sourcepub fn is_animatable(&self) -> bool
pub fn is_animatable(&self) -> bool
Returns whether this property is animatable.
sourcepub fn is_discrete_animatable(&self) -> bool
pub fn is_discrete_animatable(&self) -> bool
Returns whether this property is animatable in a discrete way.
Trait Implementations§
source§impl<'a> Clone for PropertyDeclarationId<'a>
impl<'a> Clone for PropertyDeclarationId<'a>
source§fn clone(&self) -> PropertyDeclarationId<'a>
fn clone(&self) -> PropertyDeclarationId<'a>
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<'a> Debug for PropertyDeclarationId<'a>
impl<'a> Debug for PropertyDeclarationId<'a>
source§impl<'a> MallocSizeOf for PropertyDeclarationId<'a>
impl<'a> MallocSizeOf for PropertyDeclarationId<'a>
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl<'a> PartialEq for PropertyDeclarationId<'a>
impl<'a> PartialEq for PropertyDeclarationId<'a>
source§fn eq(&self, other: &PropertyDeclarationId<'a>) -> bool
fn eq(&self, other: &PropertyDeclarationId<'a>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<'a> ToCss for PropertyDeclarationId<'a>
impl<'a> ToCss for PropertyDeclarationId<'a>
impl<'a> Copy for PropertyDeclarationId<'a>
impl<'a> StructuralPartialEq for PropertyDeclarationId<'a>
Auto Trait Implementations§
impl<'a> Freeze for PropertyDeclarationId<'a>
impl<'a> RefUnwindSafe for PropertyDeclarationId<'a>
impl<'a> Send for PropertyDeclarationId<'a>
impl<'a> Sync for PropertyDeclarationId<'a>
impl<'a> Unpin for PropertyDeclarationId<'a>
impl<'a> UnwindSafe for PropertyDeclarationId<'a>
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