pub trait Observer: Default {
type ParseMappings: Default;
type SortByOriginalLocation: Default;
type SortByGeneratedLocation: Default;
type ComputeColumnSpans: Default;
type OriginalLocationFor: Default;
type GeneratedLocationFor: Default;
type AllGeneratedLocationsFor: Default;
}
Expand description
A trait for defining a set of RAII types that can observe the start and end of various operations and queries we perform in their constructors and destructors.
This is also implemented for ()
as the “null observer” that doesn’t
actually do anything.
Required Associated Types§
Sourcetype ParseMappings: Default
type ParseMappings: Default
Observe the parsing of the "mappings"
string.
Sourcetype SortByOriginalLocation: Default
type SortByOriginalLocation: Default
Observe sorting parsed mappings by original location.
Sourcetype SortByGeneratedLocation: Default
type SortByGeneratedLocation: Default
Observe sorting parsed mappings by generated location.
Sourcetype ComputeColumnSpans: Default
type ComputeColumnSpans: Default
Observe computing column spans.
Sourcetype OriginalLocationFor: Default
type OriginalLocationFor: Default
Observe querying what the original location for some generated location is.
Sourcetype GeneratedLocationFor: Default
type GeneratedLocationFor: Default
Observe querying what the generated location for some original location is.
Sourcetype AllGeneratedLocationsFor: Default
type AllGeneratedLocationsFor: Default
Observe querying what all generated locations for some original location is.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.