pub trait Canonicalizer: Send + Sync {
// Required methods
fn lang(&self) -> &'static str;
fn canonicalize(&self, raw: &str) -> CanonicalSymbol;
// Provided methods
fn canonicalize_structured(
&self,
module: &str,
class: &str,
method: &str,
_sig: &str,
) -> CanonicalSymbol { ... }
fn resolve_async_frame(&self, _raw: &str) -> Option<String> { ... }
}Expand description
A per-language canonicalizer. Impls are in the submodules.
Required Methods§
fn lang(&self) -> &'static str
Sourcefn canonicalize(&self, raw: &str) -> CanonicalSymbol
fn canonicalize(&self, raw: &str) -> CanonicalSymbol
Convert a raw (possibly mangled) symbol name into a canonical form.
Provided Methods§
Sourcefn canonicalize_structured(
&self,
module: &str,
class: &str,
method: &str,
_sig: &str,
) -> CanonicalSymbol
fn canonicalize_structured( &self, module: &str, class: &str, method: &str, _sig: &str, ) -> CanonicalSymbol
Convert a structured symbol emitted by the tool (e.g., dotnet-trace
yields separate module/class/method/sig). Default: join with .
and fall through to canonicalize. Adapters override when they can
do something smarter than the default join.
Sourcefn resolve_async_frame(&self, _raw: &str) -> Option<String>
fn resolve_async_frame(&self, _raw: &str) -> Option<String>
Best-effort unwrap of async/state-machine frames back to the
user-visible method name. Returns Some(user_method) only when
the raw frame is recognized as a compiler-generated wrapper.