Trait Observer

Source
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§

Source

type ParseMappings: Default

Observe the parsing of the "mappings" string.

Source

type SortByOriginalLocation: Default

Observe sorting parsed mappings by original location.

Source

type SortByGeneratedLocation: Default

Observe sorting parsed mappings by generated location.

Source

type ComputeColumnSpans: Default

Observe computing column spans.

Source

type OriginalLocationFor: Default

Observe querying what the original location for some generated location is.

Source

type GeneratedLocationFor: Default

Observe querying what the generated location for some original location is.

Source

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.

Implementations on Foreign Types§

Source§

impl Observer for ()

Implementors§