pub struct Declaration<'a> {
pub name: Cow<'a, str>,
pub value: Vec<ComponentValue<'a>>,
pub important: bool,
pub span: Span,
}Expand description
name: value !important.
Fields§
§name: Cow<'a, str>§value: Vec<ComponentValue<'a>>Without the whitespace at either end or the !important.
important: bool§span: SpanFrom the name to the end of the value or the important, not
including the ;.
Implementations§
Source§impl Declaration<'_>
impl Declaration<'_>
Sourcepub fn original_text<'s>(&self, src: &'s str) -> &'s str
pub fn original_text<'s>(&self, src: &'s str) -> &'s str
The value as it was written, which a custom property keeps:
comments and all, from src, the text it was parsed from.
Trait Implementations§
Source§impl<'a> Clone for Declaration<'a>
impl<'a> Clone for Declaration<'a>
Source§fn clone(&self) -> Declaration<'a>
fn clone(&self) -> Declaration<'a>
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<'a> Debug for Declaration<'a>
impl<'a> Debug for Declaration<'a>
Source§impl Display for Declaration<'_>
impl Display for Declaration<'_>
Source§impl<'a> PartialEq for Declaration<'a>
impl<'a> PartialEq for Declaration<'a>
impl<'a> StructuralPartialEq for Declaration<'a>
Auto Trait Implementations§
impl<'a> Forget for Declaration<'a>
impl<'a> Freeze for Declaration<'a>
impl<'a> Move for Declaration<'a>
impl<'a> RefUnwindSafe for Declaration<'a>
impl<'a> Send for Declaration<'a>
impl<'a> Sync for Declaration<'a>
impl<'a> Unpin for Declaration<'a>
impl<'a> UnsafeUnpin for Declaration<'a>
impl<'a> UnwindSafe for Declaration<'a>
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