Struct style::properties::SourcePropertyDeclaration
source · pub struct SourcePropertyDeclaration {
pub declarations: SubpropertiesVec<PropertyDeclaration>,
pub all_shorthand: AllShorthand,
}
Expand description
A stack-allocated vector of PropertyDeclaration
large enough to parse one CSS key: value
declaration.
(Shorthands expand to multiple PropertyDeclaration
s.)
Fields§
§declarations: SubpropertiesVec<PropertyDeclaration>
The storage for the actual declarations (except for all).
all_shorthand: AllShorthand
Stored separately to keep SubpropertiesVec smaller.
Implementations§
source§impl SourcePropertyDeclaration
impl SourcePropertyDeclaration
sourcepub fn with_one(decl: PropertyDeclaration) -> Self
pub fn with_one(decl: PropertyDeclaration) -> Self
Create one with a single PropertyDeclaration.
sourcepub fn drain(&mut self) -> SourcePropertyDeclarationDrain<'_>
pub fn drain(&mut self) -> SourcePropertyDeclarationDrain<'_>
Similar to Vec::drain: leaves this empty when the return value is dropped.
sourcepub fn push(&mut self, declaration: PropertyDeclaration)
pub fn push(&mut self, declaration: PropertyDeclaration)
Push a single declaration.
Trait Implementations§
source§impl Default for SourcePropertyDeclaration
impl Default for SourcePropertyDeclaration
source§fn default() -> SourcePropertyDeclaration
fn default() -> SourcePropertyDeclaration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for SourcePropertyDeclaration
impl Send for SourcePropertyDeclaration
impl Sync for SourcePropertyDeclaration
impl Unpin for SourcePropertyDeclaration
impl UnwindSafe for SourcePropertyDeclaration
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> 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>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
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, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
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