Struct style::stylesheets::layer_rule::LayerName
source · pub struct LayerName(pub SmallVec<[AtomIdent; 1]>);
Expand description
A <layer-name>
: https://drafts.csswg.org/css-cascade-5/#typedef-layer-name
Tuple Fields§
§0: SmallVec<[AtomIdent; 1]>
Implementations§
source§impl LayerName
impl LayerName
sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Returns an empty layer name (which isn’t a valid final state, so caller is responsible to fill up the name before use).
sourcepub fn new_anonymous() -> Self
pub fn new_anonymous() -> Self
Returns a synthesized name for an anonymous layer.
sourcepub fn layer_names(&self) -> &[AtomIdent]
pub fn layer_names(&self) -> &[AtomIdent]
Returns the names of the layers. That is, for a layer like foo.bar
,
it’d return [foo, bar].
Trait Implementations§
source§impl MallocSizeOf for LayerName
impl MallocSizeOf for LayerName
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 LayerName
impl Parse for LayerName
source§fn parse<'i, 't>(
_: &ParserContext<'_>,
input: &mut Parser<'i, 't>,
) -> Result<Self, ParseError<'i>>
fn parse<'i, 't>( _: &ParserContext<'_>, input: &mut Parser<'i, 't>, ) -> Result<Self, ParseError<'i>>
Parse a value of this type. Read more
source§impl PartialEq for LayerName
impl PartialEq for LayerName
impl Eq for LayerName
impl StructuralPartialEq for LayerName
Auto Trait Implementations§
impl Freeze for LayerName
impl RefUnwindSafe for LayerName
impl Send for LayerName
impl Sync for LayerName
impl Unpin for LayerName
impl UnwindSafe for LayerName
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