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 PropertyDeclarations.)
Fields§
§declarations: SubpropertiesVec<PropertyDeclaration>The storage for the actual declarations (except for all).
all_shorthand: AllShorthandStored 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 Freeze for SourcePropertyDeclaration
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>
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