Struct style::properties::NonCustomPropertyId
source · #[repr(C)]pub struct NonCustomPropertyId(u16);
Expand description
A longhand or shorthand property.
Tuple Fields§
§0: u16
Implementations§
source§impl NonCustomPropertyId
impl NonCustomPropertyId
sourcepub fn is_transitionable(self) -> bool
pub fn is_transitionable(self) -> bool
Returns whether this property is transitionable.
sourcepub fn is_animatable(self) -> bool
pub fn is_animatable(self) -> bool
Returns whether this property is animatable.
sourcepub(super) fn enabled_for_all_content(self) -> bool
pub(super) fn enabled_for_all_content(self) -> bool
Whether this property is enabled for all content right now.
sourcepub fn allowed_in_rule(self, rule_types: CssRuleTypes) -> bool
pub fn allowed_in_rule(self, rule_types: CssRuleTypes) -> bool
Returns whether a given rule allows a given property.
pub(super) fn allowed_in(self, context: &ParserContext<'_>) -> bool
pub(super) fn allowed_in_ignoring_rule_type( self, context: &ParserContext<'_> ) -> bool
sourcepub(super) fn supported_types(&self) -> u8
pub(super) fn supported_types(&self) -> u8
The supported types of this property. The return value should be style_traits::CssType when it can become a bitflags type.
sourcepub(super) fn collect_property_completion_keywords(
&self,
f: KeywordsCollectFn<'_>
)
pub(super) fn collect_property_completion_keywords( &self, f: KeywordsCollectFn<'_> )
See PropertyId::collect_property_completion_keywords.
source§impl NonCustomPropertyId
impl NonCustomPropertyId
sourcepub fn to_property_id(self) -> PropertyId
pub fn to_property_id(self) -> PropertyId
Turns this NonCustomPropertyId
into a PropertyId
.
sourcepub fn as_longhand(self) -> Option<LonghandId>
pub fn as_longhand(self) -> Option<LonghandId>
Returns a longhand id, if this property is one.
sourcepub fn as_shorthand(self) -> Option<ShorthandId>
pub fn as_shorthand(self) -> Option<ShorthandId>
Returns a shorthand id, if this property is one.
sourcepub fn longhand_or_shorthand(self) -> Result<LonghandId, ShorthandId>
pub fn longhand_or_shorthand(self) -> Result<LonghandId, ShorthandId>
Returns either a longhand or a shorthand, resolving aliases.
sourcepub const fn from_longhand(id: LonghandId) -> Self
pub const fn from_longhand(id: LonghandId) -> Self
Converts a longhand id into a non-custom property id.
sourcepub const fn from_shorthand(id: ShorthandId) -> Self
pub const fn from_shorthand(id: ShorthandId) -> Self
Converts a shorthand id into a non-custom property id.
sourcepub const fn from_alias(id: AliasId) -> Self
pub const fn from_alias(id: AliasId) -> Self
Converts an alias id into a non-custom property id.
Trait Implementations§
source§impl Clone for NonCustomPropertyId
impl Clone for NonCustomPropertyId
source§fn clone(&self) -> NonCustomPropertyId
fn clone(&self) -> NonCustomPropertyId
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for NonCustomPropertyId
impl Debug for NonCustomPropertyId
source§impl From<AliasId> for NonCustomPropertyId
impl From<AliasId> for NonCustomPropertyId
source§impl From<LonghandId> for NonCustomPropertyId
impl From<LonghandId> for NonCustomPropertyId
source§fn from(id: LonghandId) -> Self
fn from(id: LonghandId) -> Self
source§impl From<ShorthandId> for NonCustomPropertyId
impl From<ShorthandId> for NonCustomPropertyId
source§fn from(id: ShorthandId) -> Self
fn from(id: ShorthandId) -> Self
source§impl Hash for NonCustomPropertyId
impl Hash for NonCustomPropertyId
source§impl MallocSizeOf for NonCustomPropertyId
impl MallocSizeOf for NonCustomPropertyId
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl PartialEq<NonCustomPropertyId> for NonCustomPropertyId
impl PartialEq<NonCustomPropertyId> for NonCustomPropertyId
source§fn eq(&self, other: &NonCustomPropertyId) -> bool
fn eq(&self, other: &NonCustomPropertyId) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl ToComputedValue for NonCustomPropertyIdwhere
u16: ToComputedValue<ComputedValue = u16>,
impl ToComputedValue for NonCustomPropertyIdwhere u16: ToComputedValue<ComputedValue = u16>,
§type ComputedValue = NonCustomPropertyId
type ComputedValue = NonCustomPropertyId
source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Context
.source§impl ToCss for NonCustomPropertyId
impl ToCss for NonCustomPropertyId
source§impl ToResolvedValue for NonCustomPropertyIdwhere
u16: ToResolvedValue<ResolvedValue = u16>,
impl ToResolvedValue for NonCustomPropertyIdwhere u16: ToResolvedValue<ResolvedValue = u16>,
§type ResolvedValue = NonCustomPropertyId
type ResolvedValue = NonCustomPropertyId
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
source§impl ToShmem for NonCustomPropertyId
impl ToShmem for NonCustomPropertyId
impl Copy for NonCustomPropertyId
impl Eq for NonCustomPropertyId
impl StructuralEq for NonCustomPropertyId
impl StructuralPartialEq for NonCustomPropertyId
Auto Trait Implementations§
impl RefUnwindSafe for NonCustomPropertyId
impl Send for NonCustomPropertyId
impl Sync for NonCustomPropertyId
impl Unpin for NonCustomPropertyId
impl UnwindSafe for NonCustomPropertyId
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
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