Struct lightningcss::properties::custom::UnparsedProperty
source · pub struct UnparsedProperty<'i> {
pub property_id: PropertyId<'i>,
pub value: TokenList<'i>,
}
Expand description
A known property with an unparsed value.
This type is used when the value of a known property could not
be parsed, e.g. in the case css var()
references are encountered.
In this case, the raw tokens are stored instead.
Fields§
§property_id: PropertyId<'i>
The id of the property.
value: TokenList<'i>
The property value, stored as a raw token list.
Implementations§
source§impl<'i> UnparsedProperty<'i>
impl<'i> UnparsedProperty<'i>
sourcepub fn parse<'t, T>(
property_id: PropertyId<'i>,
input: &mut Parser<'i, 't>,
options: &ParserOptions<'_, '_, T>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
pub fn parse<'t, T>(
property_id: PropertyId<'i>,
input: &mut Parser<'i, 't>,
options: &ParserOptions<'_, '_, T>
) -> Result<Self, ParseError<'i, ParserError<'i>>>
Parses a property with the given id as a token list.
sourcepub fn with_property_id(
&self,
property_id: PropertyId<'i>
) -> UnparsedProperty<'i>
pub fn with_property_id(
&self,
property_id: PropertyId<'i>
) -> UnparsedProperty<'i>
Returns a new UnparsedProperty with the same value and the given property id.
Trait Implementations§
source§impl<'i> Clone for UnparsedProperty<'i>
impl<'i> Clone for UnparsedProperty<'i>
source§fn clone(&self) -> UnparsedProperty<'i>
fn clone(&self) -> UnparsedProperty<'i>
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<'i> Debug for UnparsedProperty<'i>
impl<'i> Debug for UnparsedProperty<'i>
source§impl<'i> PartialEq<UnparsedProperty<'i>> for UnparsedProperty<'i>
impl<'i> PartialEq<UnparsedProperty<'i>> for UnparsedProperty<'i>
source§fn eq(&self, other: &UnparsedProperty<'i>) -> bool
fn eq(&self, other: &UnparsedProperty<'i>) -> bool
source§impl<'i, __T: Visit<'i, __T, __V>, __V: Visitor<'i, __T>> Visit<'i, __T, __V> for UnparsedProperty<'i>
impl<'i, __T: Visit<'i, __T, __V>, __V: Visitor<'i, __T>> Visit<'i, __T, __V> for UnparsedProperty<'i>
source§const CHILD_TYPES: VisitTypes = _
const CHILD_TYPES: VisitTypes = _
The types of values contained within this value and its children.
This is used to skip branches that don’t have any values requested
by the Visitor. Read more
source§fn visit_children(&mut self, visitor: &mut __V)
fn visit_children(&mut self, visitor: &mut __V)
Visit the children of this value.
impl<'i> StructuralPartialEq for UnparsedProperty<'i>
Auto Trait Implementations§
impl<'i> RefUnwindSafe for UnparsedProperty<'i>
impl<'i> Send for UnparsedProperty<'i>
impl<'i> Sync for UnparsedProperty<'i>
impl<'i> Unpin for UnparsedProperty<'i>
impl<'i> UnwindSafe for UnparsedProperty<'i>
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer