pub struct Collector;Expand description
Installs itself on the bus and routes events to whichever request is running.
Implementations§
Source§impl Collector
impl Collector
Sourcepub fn install()
pub fn install()
Subscribe once, for the life of the process.
Every dispatched event reaches this, and it drops the ones arriving on a task with no bar — a background job, a queue worker, anything that is not a request being rendered.
Idempotent, and it has to be. Subscribing twice does not collect twice as carefully; it records every query twice, and the bar then reports a page making double the queries it makes. A plugin registered in two places, or a test suite calling this per test, would both do it.
Auto Trait Implementations§
impl Freeze for Collector
impl RefUnwindSafe for Collector
impl Send for Collector
impl Sync for Collector
impl Unpin for Collector
impl UnsafeUnpin for Collector
impl UnwindSafe for Collector
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