pub struct ArbitraryDeclarationValue {
pub start: NonZeroUsize,
pub end: NonZeroUsize,
first_token_type: TokenSerializationType,
last_token_type: TokenSerializationType,
pub references: References,
}Expand description
An arbitrary <declaration-value> nested inside of a substitution function.
Fields§
§start: NonZeroUsizeThe start of the value in the referencing value’s CSS, counted in bytes.
end: NonZeroUsizeThe end of the value in the referencing value’s CSS, counted in bytes.
first_token_type: TokenSerializationType§last_token_type: TokenSerializationType§references: ReferencesReferences from this value.
Implementations§
Source§impl ArbitraryDeclarationValue
impl ArbitraryDeclarationValue
fn parse_internal( input: &mut Parser<'_>, context: &mut SubstitutionParserContext<'_>, additional_delimiters: Delimiters, ) -> Result<Self, ParseError>
Sourcefn parse_free_form<'i>(
input: &mut Parser<'i>,
context: &mut SubstitutionParserContext<'_>,
additional_delimiters: Delimiters,
is_non_strict: bool,
) -> Result<(Self, &'i str), ParseError>
fn parse_free_form<'i>( input: &mut Parser<'i>, context: &mut SubstitutionParserContext<'_>, additional_delimiters: Delimiters, is_non_strict: bool, ) -> Result<(Self, &'i str), ParseError>
Parses a free-form <declaration-value> production, which may be surrounded by curly
braces. Also returns the source text of the value, excluding any curly braces. If parsing
a legacy non-strict production, an unbraced value may also contain commas and {} blocks.
https://drafts.csswg.org/css-values-5/#component-function-commas
https://drafts.csswg.org/css-values-5/#non-strict-free-form-production
fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for ArbitraryDeclarationValue
impl Clone for ArbitraryDeclarationValue
Source§fn clone(&self) -> ArbitraryDeclarationValue
fn clone(&self) -> ArbitraryDeclarationValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ArbitraryDeclarationValue
impl Debug for ArbitraryDeclarationValue
Source§impl MallocSizeOf for ArbitraryDeclarationValue
impl MallocSizeOf for ArbitraryDeclarationValue
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.
impl StructuralPartialEq for ArbitraryDeclarationValue
Source§impl ToShmem for ArbitraryDeclarationValue
impl ToShmem for ArbitraryDeclarationValue
Auto Trait Implementations§
impl Freeze for ArbitraryDeclarationValue
impl RefUnwindSafe for ArbitraryDeclarationValue
impl Send for ArbitraryDeclarationValue
impl Sync for ArbitraryDeclarationValue
impl Unpin for ArbitraryDeclarationValue
impl UnsafeUnpin for ArbitraryDeclarationValue
impl UnwindSafe for ArbitraryDeclarationValue
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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