Expand description
Re-export aspect-rs
’s types to avoid crates depending on it.
The Enter
trait is called when entering in an aspect, before the wrapped expression is called.
Required Associated Types
Required Methods
enter
is called when entering in an aspect
Use it to set-up some context before calling the expression. For instance, the ResponseTime
metric in the metered crate uses it to get the current time before the invocation, and pass it over to OnResult
to compute the elapsed time.
Aspects which don’t need enter can simply do nothing and return unit.