pub struct Collector<'a> { /* private fields */ }Expand description
The main collector that executes collection rules against CSS.
Implementations§
Source§impl<'a> Collector<'a>
impl<'a> Collector<'a>
Sourcepub fn new(sheet: &'a Sheet<'a>, source: &'a str, allocator: &'a Bump) -> Self
pub fn new(sheet: &'a Sheet<'a>, source: &'a str, allocator: &'a Bump) -> Self
Create a new Collector from a parsed Sheet.
Sourcepub fn collect(&mut self, stylesheet: &StyleSheet<'_>, css_source: &str)
pub fn collect(&mut self, stylesheet: &StyleSheet<'_>, css_source: &str)
Collect diagnostics & stats on a CSS stylesheet.
Sourcepub fn diagnostics<'b>(
&'b self,
css_source: &'b str,
) -> impl Iterator<Item = CollectorDiagnostic> + 'b
pub fn diagnostics<'b>( &'b self, css_source: &'b str, ) -> impl Iterator<Item = CollectorDiagnostic> + 'b
Get all diagnostics from matched rules.
This method should be called after collect() to retrieve diagnostics
for all rules that had diagnostic templates and matched nodes.
Auto Trait Implementations§
impl<'a> Freeze for Collector<'a>
impl<'a> !RefUnwindSafe for Collector<'a>
impl<'a> !Send for Collector<'a>
impl<'a> !Sync for Collector<'a>
impl<'a> Unpin for Collector<'a>
impl<'a> UnsafeUnpin for Collector<'a>
impl<'a> !UnwindSafe for Collector<'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