Struct style::properties_and_values::syntax::Descriptor
source · pub struct Descriptor {
pub components: Vec<Component>,
specified: Option<Box<str>>,
}
Fields§
§components: Vec<Component>
The parsed components, if any. TODO: Could be a Box<[]> if that supported const construction.
specified: Option<Box<str>>
The specified css syntax, if any.
Implementations§
source§impl Descriptor
impl Descriptor
sourcepub fn is_universal(&self) -> bool
pub fn is_universal(&self) -> bool
Returns whether this is the universal syntax descriptor.
sourcepub fn specified_string(&self) -> Option<&str>
pub fn specified_string(&self) -> Option<&str>
Returns the specified string, if any.
sourcepub fn from_str(css: &str, save_specified: bool) -> Result<Self, ParseError>
pub fn from_str(css: &str, save_specified: bool) -> Result<Self, ParseError>
Parse a syntax descriptor. https://drafts.css-houdini.org/css-properties-values-api-1/#consume-a-syntax-definition
sourcepub fn dependent_types(&self) -> DependentDataTypes
pub fn dependent_types(&self) -> DependentDataTypes
Returns the dependent types this syntax might contain.
Trait Implementations§
source§impl Clone for Descriptor
impl Clone for Descriptor
source§fn clone(&self) -> Descriptor
fn clone(&self) -> Descriptor
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 Descriptor
impl Debug for Descriptor
source§impl Default for Descriptor
impl Default for Descriptor
source§fn default() -> Descriptor
fn default() -> Descriptor
Returns the “default value” for a type. Read more
source§impl MallocSizeOf for Descriptor
impl MallocSizeOf for Descriptor
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 Parse for Descriptor
impl Parse for Descriptor
source§fn parse<'i>(
_: &ParserContext<'_>,
parser: &mut CSSParser<'i, '_>,
) -> Result<Self, StyleParseError<'i>>
fn parse<'i>( _: &ParserContext<'_>, parser: &mut CSSParser<'i, '_>, ) -> Result<Self, StyleParseError<'i>>
Parse a syntax descriptor.
source§impl PartialEq for Descriptor
impl PartialEq for Descriptor
source§impl ToCss for Descriptor
impl ToCss for Descriptor
impl StructuralPartialEq for Descriptor
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnwindSafe for Descriptor
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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