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_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
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 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
Converts to this type from the input type.
source§impl From<ShorthandId> for NonCustomPropertyId
impl From<ShorthandId> for NonCustomPropertyId
source§fn from(id: ShorthandId) -> Self
fn from(id: ShorthandId) -> Self
Converts to this type from the input type.
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
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl PartialEq for NonCustomPropertyId
impl PartialEq for NonCustomPropertyId
source§fn eq(&self, other: &NonCustomPropertyId) -> bool
fn eq(&self, other: &NonCustomPropertyId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ToComputedValue for NonCustomPropertyId
impl ToComputedValue for NonCustomPropertyId
§type ComputedValue = NonCustomPropertyId
type ComputedValue = NonCustomPropertyId
The computed value type we’re going to be converted to.
source§fn from_computed_value(from: &Self::ComputedValue) -> Self
fn from_computed_value(from: &Self::ComputedValue) -> Self
Convert a computed value to specified value form. Read more
source§fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
fn to_computed_value(&self, context: &Context<'_>) -> Self::ComputedValue
Convert a specified value to a computed value, using itself and the data
inside the
Context
.source§impl ToCss for NonCustomPropertyId
impl ToCss for NonCustomPropertyId
source§impl ToResolvedValue for NonCustomPropertyId
impl ToResolvedValue for NonCustomPropertyId
§type ResolvedValue = NonCustomPropertyId
type ResolvedValue = NonCustomPropertyId
The resolved value type we’re going to be converted to.
source§fn from_resolved_value(from: Self::ResolvedValue) -> Self
fn from_resolved_value(from: Self::ResolvedValue) -> Self
Convert a resolved value to resolved value form.
source§fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
fn to_resolved_value(self, context: &Context<'_>) -> Self::ResolvedValue
Convert a resolved value to a resolved value.
source§impl ToShmem for NonCustomPropertyId
impl ToShmem for NonCustomPropertyId
impl Copy for NonCustomPropertyId
impl Eq for NonCustomPropertyId
impl StructuralPartialEq for NonCustomPropertyId
Auto Trait Implementations§
impl Freeze for NonCustomPropertyId
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
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
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>
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